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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog