Pear install for macports PHP5

demet8 picture demet8 · Feb 12, 2011 · Viewed 11.4k times · Source

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?

Answer

TrippyD picture TrippyD · Apr 27, 2011

While the curl option works, it won't update as you update your ports. An alternative:

sudo port install php5 +pear

This will install the variant of php5 with pear, in the same location as downloading above, and it will update as you update macports.