php MAMP路径问题

时间:2011-04-23 03:27:53

标签: php pear mamp

您好我下载了一些PEAR文件,它们位于我的MAMP目录的bin文件夹中。在bin文件夹中,它们位于一堆子文件夹(php 5.3 / lib / php / pear等)中,如下所示

但是,需要PEAR的文件位于htdocs中,所以它们根本不连接。由于我是一个新手,我很谨慎从bin中的php文件夹中取出所有这些文件并将它们移动到htdocs中,但它也是一个复杂的文件路径,将它们包含在来自htdocs的每个文件中。

有没有人用过Pear。它应该像这样设置吗?

bin and htdocs in MAMP folder

inside bin

Pear文件夹的UPDATE -screenshot,以及终端指出梨的建议位置的屏幕截图 Pear

terminal asking me where to put 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

1 个答案:

答案 0 :(得分:1)

  

您好我下载了一些PEAR文件

您下载过它们还是MAMP附带的?你安装梨?

是什么意思

  

需要PEAR的文件是iin htdocs

无论如何,安装pear对于每个操作系统都是类似的。 因此,您必须在PHP 5.3文件夹中调用文件php go-pear.phar(将安装pear)

如果没有,请尝试这些(请参阅MacOS安装,具体取决于您的操作系统版本)

http://pear.php.net/manual/en/installation.getting.php

重新安装您的PEAR

$ wget http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar

http://www.bsp.ca/?p=108

然后你调用sudo pear install package_name你不需要在你的htdocs中包含任何内容。一旦安装了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