Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
497 views
in Technique[技术] by (71.8m points)

php - Install PECL on Mac OS X 10.6

Is there any way to install PHP:s PECL handler on Mac OS X 10.6, to be used with the bundled PHP?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Better late than never, but if you are like me and installed PHP directly from php.net (instead of using something like Homebrew or Port, then you can simply follow the following link to install Pear and PECL:

http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/

We need PEAR! For some reason, it's not set up ready to on Lion, but the install phar file is here, so we just need to run it.

cd /usr/lib/php
sudo php install-pear-nozlib.phar

Edit:
/etc/php.ini and find the line: ;
  include_path = ".:/php/includes" 
and change it to:
  include_path = ".:/usr/lib/php/pear"
sudo pear channel-update pear.php.net
sudo pecl channel-update pecl.php.net
sudo pear upgrade-all

It worked fine for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...