I needed the pcntl module for a project I’m working on in PHP. By default this module is not installed when you install PHP, so you’ll need to compile it. There is a brew package for it, but I couldn’t get it to work, and I think it’s just as simple to compile it.
First you’ll need to download the PHP source. Run
php -v to get your PHP version and browse the PHP releases page for your version. In my case it was 5.3.10.
Some people reported that they got an error while running ./configure. I did not run into this issue, but if you do, you’ll need to specify your system architecture.
All that’s left to do is compile, install it, and enable it.
If you are using Apache, you will need to restart it to take affect.
Comments? I'm @mloberg on Twitter.