Monday, February 14, 2011

Getting PHP's pcntl working on Snow Lepard

(make sure you've installed Apple's developer tools)

1. Check your version you have installed and download the PHP source code.

$ php -v
PHP 5.3.3 (cli) (built: Aug 22 2010 19:41:55)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

$ curl -O

2. unpack, phpize, configure, make, make install

$ tar -xzvf php-5.3.3.tar.gz
$ cd php-5.3.3/ext/pcntl/
$ phpize
$ ./configure
$ make
$ sudo make install

3. Add "" to your /etc/php.ini

4. Confirm

$ php -i | grep pcntl
pcntl support => enabled


1 comment:

Eric Murano said...

Thanks very much for this!

I'm still using the OS X default PHP and I want to have the most up to date version. If I just compile and install PHP from source will that overwrite the default install will that mess things up?