Tags: , , , , ,

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:

  1. Download PSLib 0.2.6. Unpack to somewhere on your filesystem (I use /usr/src)
  2. cd pslib-0.2.6/src
  3. Apply this patch to pslib.c (patch pslib.c leopard_pslib-0.2.6.patch)
  4. cd ../
  5. ./configure
  6. make
  7. make install

By default this puts it in /usr/local/lib. Now install the PS extension using PECL.

  1. pecl install ps
  2. When it asks for path to pslib installation, /usr/local/lib
  3. 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.
  4. sudo apachectl restart

One Response to “Installing PECL PS on Mac OS X”

  1. Chris Says:

    How did you get pecl into Leopard?


Leave a Reply