Install php extension in MAMP environment

Source: Internet
Author: User
: 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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.