Installing PHP extensions in Linux using Phpize

Source: Internet
Author: User

Linux system, after the successful installation of PHP, in the bin directory will generate a name phpize executable script, the purpose of this script is to dynamically install the PHP extension module.
The benefit of installing PHP extensions with the Phpize script: There are no extensions installed when PHP is installed and can be installed at any later time without having to reinstall PHP.

Installation steps:

1. Switch to the Extension module directoryIn the PHP source package is extracted after the directory has an EXT subdirectory, there are nearly 70 major PHP expansion Module installation package.
To install the IMAP extension now, switch to the IMAP directory:
Cd/software/php-5.5.3/ext/imap
2. Execute the Phpize script in the IMAP directory/usr/local/php/bin/phpize
successful execution returns several rows of data:
Configuring for:
PHP Api version:20041225
Zend Module Api no:20060613
Zend Extension Api no:220060519
3. Start compiling (note--with-php-config parameters)if the compilation process error, you can refer to another article to resolve the error http://blog.csdn.net/haiqiao_2010/article/details/46005773
./configure--with-php-config=/usr/local/php/bin/php-config--with-kerberos--with-imap-ssl

4. make5. Make install

The following information is indicated:


at this time
/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
Catalog generates imap.so files

6. Find the Extension_dir field in PHP.ini .change the value to:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
7, and then in the PHP.ini Dynamic Extensions section position under the Addextension = "imap.so"
 8. Restart the server
PHP, NGINX, APACHE, complete.
phpinfo () sees the following module extension, which indicates that the installation was successful.

Installing PHP extensions in Linux using Phpize

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.