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
Apply this patch to pslib.c (
patch pslib.c leopard_pslib-0.2.6.patch)
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,
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