Alex Rivera | Logout

Pear install for macports PHP5

Asked 2011-02-12T22:50:00.767
18

I have PHP5 installed via macports in /opt/local/..the default location for macports. There's no portfile for pear. If I do a standard pear install from the pear site what directory location should pear be placed in to work with PHP?

Edit
Report

1 Answer

0

For those of you running PHP outside of MacPorts @Ben's answer, with the following modification, is actually the solution to the problem. I needed PEAR to install PHPUnit so I could do some unit testing but I use XAMPP.

I followed Ben's solution but got an error when trying to install it. My error was:

WARNING! The include_path defined in the currently used php.ini does 
not contain the PEAR PHP directory you just specified:
</opt/local/share/pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.

Current include path           : .:
Configured directory           : /opt/local/share/pear
Currently used php.ini (guess) :

I set the path of Currently used php.ini to the following and all worked perfectly:

/Applications/XAMPP/xamppfiles/etc/php.ini

Hope that at worst, this helps other XAMPP users!

answered 2013-07-24T09:05:18.983

Your Answer