开发者

Snow Leopard - PHP 5.3.1 installed... but no PEAR?

开发者 https://www.devze.com 2023-01-02 16:49 出处:网络
I\'ve been trying to do some PHP work on my snow leopard machine.. but I\'ve found issues when I need to use PEAR packages (as symfony handles its php plugi开发者_开发问答ns with PEAR).

I've been trying to do some PHP work on my snow leopard machine.. but I've found issues when I need to use PEAR packages (as symfony handles its php plugi开发者_开发问答ns with PEAR).

I've found some references that state that snow leopard includes PEAR.. but how come I cant find it?!

Could someone confirm this.. if if so, where is my pear?


In OSX Snow Leopard and later pear isn't installed by default. The installer is already available to you though.

sudo php /usr/lib/php/install-pear-nozlib.phar
pear config-set php_ini /private/etc/php.ini
pecl config-set php_ini /private/etc/php.ini
sudo pear upgrade-all


/usr/bin/pear

I ran which pear from the command line.


which pear 
/usr/local/bin/pear

if which doesn't work try locate pear which will search your machine, if a result is returned you need to update you .bash_profile (in your home directory) to include pear (normally the parent directory) eg.

export PATH="/usr/local/bin:$PATH"

If you can't locate pear on your system, use terminal to get it :

curl http://pear.php.net/go-pear > go-pear.php
sudo php -q go-pear.php

All the options can be left at default except install directory which you need to set. Mine is /usr/local but other locations such as /opt/local will be fine (as long as the path is in your bash profile...

0

精彩评论

暂无评论...
验证码 换一张
取 消