[英]php MAMP path problem
Hi I downloaded some PEAR files and they're in the bin folder of my MAMP directory. 嗨,我下载了一些PEAR文件,它们位于MAMP目录的bin文件夹中。 Inside the bin folder, they're in a bunch of subfolders (php 5.3/lib/php/pear etc) as you can see below 在bin文件夹中,它们位于一堆子文件夹(php 5.3 / lib / php / pear等)中,如下所示
However, the files that are requiring PEAR are in htdocs, so they're not connecting at all. 但是,需要PEAR的文件位于htdocs中,因此它们根本没有连接。 As I'm a newbie I'm cautious about taking all of those files from the php folder in bin and moving them into htdocs, yet it would also be a complicated file path to include them in every file from htdocs. 由于我是新手,因此对于从bin中的php文件夹中获取所有这些文件并将它们移至htdocs中时,我非常谨慎,但是将它们包含在htdocs的每个文件中也将是一个复杂的文件路径。
Has anyone used Pear. 有没有人用过梨。 Is it supposed to be set up like this? 是否应该这样设置?
UPDATE -screenshot of Pear folder, and also screenshot of terminal pointing out suggested locations for pear UPDATE-Pear文件夹的屏幕快照,以及终端的屏幕快照,指出了梨的建议位置
# Setting PATH for MacPython 2.6
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH
#I HAVE ADDED THE PATH HERE
export PATH=$PATH:/usr/local/mysql/bin:/Users/michaelmitchell/pear/bin/
# Setting PATH for Python 3.2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}"
export PATH
File Name to Write: .bash_profile (HIT ENTER)
^G Get Help ^T To Files M-M Mac Format M-P Prepend
^C Cancel M-D DOS Format M-A Append M-B Backup File
Hi I downloaded some PEAR files 嗨,我下载了一些PEAR文件
Did you downloaded them or the came with MAMP? 您下载了它们还是MAMP附带了? Did you install pear?? 您安装了梨吗?
what do you mean by 你是什么意思
files that are requiring PEAR are iin htdocs 要求PEAR的文件是htdocs
Regardless, installing pear is similar for every OS. 无论如何,对于每个OS而言,安装pear都是相似的。 So, you have to call the file php go-pear.phar
in your PHP 5.3 folder (that will install pear) 因此,您必须在PHP 5.3文件夹中调用php go-pear.phar
文件(这将安装pear)
if not, try these (see MacOS installation depending on your OS version) 如果不是,请尝试以下操作(请根据您的操作系统版本查看MacOS安装)
http://pear.php.net/manual/en/installation.getting.php http://pear.php.net/manual/en/installation.getting.php
to reinstall your PEAR 重新安装您的梨
$ wget http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar
http://www.bsp.ca/?p=108 http://www.bsp.ca/?p=108
and then you call sudo pear install package_name
you don't need to include anything in your htdocs. 然后调用sudo pear install package_name
您不需要在htdocs中包含任何内容。 Files that need PEAR (or PEAR packages) will be handled by php once PEAR and related package is is installed 一旦安装了PEAR和相关的软件包,需要PEAR(或PEAR软件包)的文件将由php处理。
# Setting PATH for MacPython 2.6
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH
#I HAVE ADDED THE PATH HERE
export PATH=$PATH:/usr/local/mysql/bin:/Users/michaelmitchell/pear/bin/
# Setting PATH for Python 3.2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}"
export PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.