开发者

php MAMP path problem

Hi I downloaded some PEAR files and they're in the bin folder of my MAMP directory. Inside the bin folder, they're in a bunch of subfolders (php 5.3/lib/ph开发者_Python百科p/pear etc) as you can see below

However, the files that are requiring PEAR are in htdocs, so they're not connecting at all. 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.

Has anyone used Pear. Is it supposed to be set up like this?

php MAMP path problem

php MAMP path problem

UPDATE -screenshot of Pear folder, and also screenshot of terminal pointing out suggested locations for pear

php MAMP path problem

php MAMP path problem

# 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

Did you downloaded them or the came with MAMP? Did you install pear??

what do you mean by

files that are requiring PEAR are iin htdocs

Regardless, installing pear is similar for every OS. So, you have to call the file php go-pear.phar in your PHP 5.3 folder (that will install pear)

if not, try these (see MacOS installation depending on your OS version)

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

and then you call sudo pear install package_name you don't need to include anything in your htdocs. Files that need PEAR (or PEAR packages) will be handled by php once PEAR and related package is is installed

# 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜