Objective:
PCNTL Introduction
PCNTL extensions can support multithreaded operations in PHP. (Non-UNIX class systems do not support this module)
Phpize Introduction
Phpize can be used to dynamically add extensions to PHP. For example, when compiling PHP, forget to add an extension, and then want to add the extension, that is, you can use phpize dynamic to add the extension.
This article describes how to add pcntl extensions for PHP using phpize to the integrated environment under Mac Mamp. Unix-like environments can be installed using this method, with a note of flexibility.
Installation:
Download and the local PHP version corresponding to the source code package, the address is:
http://www.php.net/releases/
Then compile with the following steps (the demo is to add pcntl extensions to the PHP 5.6.10 version of Mamp):
$ TAR-XZVF php-5.6.10.tar.gz
$ mv php-5.6.10 php
$ mkdir-p/applications/mamp/bin/php/php5.6.10/include
$ MV Php/applications/mamp/bin/php/php5.6.10/include
$ cd/applications/mamp/bin/php/php5.6.10/include/php
$ macosx_deployment_target=10.10 $/configure $
cflags= "-arch i386-arch x86_64-g-os-pipe-no-cpp-precomp" c8/>$ ccflags= "-arch i386-arch x86_64-g-os-pipe"
$ cxxflags= "-arch i386-arch x86_64-g-os-pipe"
$ LDFLAGS= "-arch i386-arch x86_64-bind_at_load"
$ export cflags cxxflags ldflags ccflags macosx_deployment_target
$ cd E Xt/pcntl
$ phpize
$/configure
$ make
$ CP modules/pcntl.so/applications/mamp/bin/php/ php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/
$ echo "extension=pcntl.so" >>/applications/ Mamp/bin/php/php5.6.10/conf/php.ini
$/applications/mamp/bin/php/php5.6.10/bin/php--ri pcntl
pcntl
pcntl Support => enabled