Search code examples
phpmacospear

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). However, I need to use php 5.4. I downloaded php 5.4 but am unable to link it with the already-installed 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/"

Neither of those methods worked. Any guidance would be appreciated.


Solution

  • The include_path should link to the folder in which the System.php file exists. 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.

    Check this link for more details: http://pear.php.net/manual/en/installation.checking.php