简体   繁体   English

如何将 php 安装链接到 OS X 上的 pear?

[英]How to link a php install to pear on OS X?

I have Pear already installed and linked to php 5.5 (which is the default version that came with the OS).我已经安装了 Pear 并链接到了 php 5.5(这是操作系统附带的默认版本)。 However, I need to use php 5.4.但是,我需要使用 php 5.4。 I downloaded php 5.4 but am unable to link it with the already-installed pear.我下载了 php 5.4,但无法将其与已安装的 pear 链接。

I tried doing brew link php54 in terminal and tried adding the path to the my installed Pear folder in the php.ini for php54 like so: include_path = ".:/usr/local/pear/"我尝试在终端中执行brew link php54并尝试在 php.ini 中为 php54 添加到我安装的 Pear 文件夹的路径,如下所示: include_path = ".:/usr/local/pear/"

Neither of those methods worked.这些方法都没有奏效。 Any guidance would be appreciated.任何指导将不胜感激。

The include_path should link to the folder in which the System.php file exists. include_path 应该链接到System.php文件所在的文件夹。 This file exists in the path /usr/local/pear/share/pear in OS X so when I put that as the include path, it worked.该文件存在于 OS X 中的路径/usr/local/pear/share/pear中,因此当我将其作为包含路径时,它起作用了。

Check this link for more details: http://pear.php.net/manual/en/installation.checking.php查看此链接了解更多详情: http : //pear.php.net/manual/en/installation.checking.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM