drnx3715 2011-04-23 03:27
浏览 105
已采纳

php MAMP路径问题

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/php/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?

bin and htdocs in MAMP folder

inside bin

UPDATE -screenshot of Pear folder, and also screenshot of terminal pointing out suggested locations for pear 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条回答 默认 最新

  • dtvam48220 2011-04-23 03:52
    关注

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭