php MAMP路径问题

发布于 2024-11-03 03:16:05 字数 1413 浏览 1 评论 0原文

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

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

有人用过梨子吗?是不是应该这样设置呢?

MAMP 文件夹中的 bin 和 htdocs

inside bin

Pear 文件夹的更新屏幕截图,以及指出 pear 建议位置的终端屏幕截图 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 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

饮湿 2024-11-10 03:16:05

嗨,我下载了一些 PEAR 文件

你下载的是它们还是 MAMP 附带的?你安装梨了吗?

你是什​​么意思

需要 PEAR 的文件位于 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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文