Install PECL on Mac OS X 10.6
Asked Answered
S

2

27

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

Spectra answered 4/4, 2011 at 8:33 Comment(0)
H
68

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.

Hierarch answered 4/3, 2012 at 16:36 Comment(2)
I would say that editing php.ini is not necessary, because default include_path value seems to be already pointing to PEAR directories.Clink
if you have mavericks please follow the following tutorial akrabat.com/computing/setting-up-php-mysql-on-os-x-mavericksRamberg
E
1

Try installing it via:

bash <(curl -s http://php-osx.liip.ch/install.sh)

Or install by hand:

curl -s -o /tmp/packager.tgz http://php-osx.liip.ch/packager/packager.tgz
sudo tar -C /usr/local  -xzf /tmp/packager.tgz

Then install packer:

sudo /usr/local/packager/packager.py install 5.4-frontenddev

otherwise update it via:

sudo /usr/local/packager/packager.py install tools-frontenddev # Ignore 
Endbrain answered 11/4, 2016 at 8:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.