Installing PECL PS on Mac OS X
May 15, 2008
Tags: php, pecl, ps, leopard, os x, osx
The PHP that comes standard with Mac OS X Leopard doesn’t come with the PECL PS extension. PECL PS requires pslib, and the last version I verified to work the PS extension was 0.2.6 (I still have an outstanding bug for that). There’s a minor little bug that prevents it from compiling on OS X, so here are the steps necessary to get PECL PS working on Leopard:
- Download PSLib 0.2.6. Unpack to somewhere on your filesystem (I use
/usr/src) cd pslib-0.2.6/src- Apply this patch to pslib.c (
patch pslib.c leopard_pslib-0.2.6.patch) cd .././configuremakemake install
By default this puts it in /usr/local/lib. Now install the PS extension using PECL.
pecl install ps- When it asks for path to pslib installation,
/usr/local/lib - Once it’s done compiling, add the .so to your php.ini. You may have to move the .so or alter extension_dir in your php.ini.
sudo apachectl restart
October 22, 2008 at 6:31 am
How did you get pecl into Leopard?