: This article describes how to install php extensions in the MAMP environment. For more information about PHP tutorials, see.
Install php extension in MAMP environment
Install the PHP extension, and you will first think of using phpize. you can find a good tutorial on the Internet. However, I understand why it took me a few hours?
1. go to php.net to download the source code of the corresponding version.
/Application/MAMP/bin/php/php5.6.10/include/php
2. enter the corresponding extension directory and run phpize
$cd /Application/MAMP/bin/php/php5.6.10/include/php/ext/pcntl$/Applications/MAMP/bin/php/php5.6.10/bin/phpize
A prompt should be returned, similar
3. compiled
./configure --with-php-c/MAMP/bin/php/php5.6.10/bin/php-config
-With-php-config points to php-config in the current php version. if this path is incorrect, compilation will fail.
4. it seems to be quite smooth:make && make install
.
The problem arises.fatal error:'zend_config.h' file not found
.
Search for the entire computer: find/-name 'zend _ config. H'. the file is not found. Next, an error is reported.fatal error:'conf.w32.h' file not found
.
After searching for a while, I found the problem: MAMP deleted all these header files .... You need to take one more step:
$cd /Applications/MAMP/bin/php/php5.6.10/include/php/$./configure
Prompt that the icov path is not specified. Add-without-icov directly, as long as it can./configure is successful, and make & make install is not required.
Now we need to repeat steps 3rd and 4. if compilation is successful, a prompt will be displayed.
Add extension = pcntl. so to php. ini and restart apache.
The above is the content for installing php extensions in the MAMP environment. For more information, see PHP Chinese network (www.php1.cn )!