Use phpize in centos without re-compiling to add extension libraries for PHP

Source: Internet
Author: User
Tags zts
Many times, many extension libraries are not added when compiling PHP; many extension libraries are not used only when running web programs, but I have already set up PHP (LNMP, I don't want to re-compile and install it. Now you can use phpize to install the extension library. This article takes CentOS6.5 compilation and installation of Nginx1.70 + PHP5.59 + MySQL5.6.16 as a prerequisite.

Many times, many extension libraries are not added when compiling PHP; many extension libraries are not used only when running web programs, but I have already set up PHP (LNMP, I don't want to re-compile and install it. Now you can use phpize to install the extension library. This article takes CentOS6.5 compilation and installation of Nginx1.70 + PHP5.59 + MySQL5.6.16 as a prerequisite.

Many times, many extension libraries are not added when compiling PHP; many extension libraries are not used only when running web programs, but I have already set up PHP (LNMP, I don't want to re-compile and install it. Now you can use phpize to install the extension library. This document usesCentOS6.5 compile and install Nginx1.70 + PHP5.59 + MySQL5.6.16.

For example, (php version 5.5.9, installation directory/usr/local/php5, source code directory/opt/softs/-php5.5.9, you need to add pdo_mysql support ):

Go to the php source code directory
> Cd/opt/softs/php-5.5.9/ext/pdo_mysql
>/Usr/local/php5/bin/phpize
>./Configure-with-php-config =/usr/local/php5/bin/php-config-with-pdo-mysql =/usr/local/mysql/
> Make & make install.
After that, the system prompts the directory where the pdo_mysql.so file is located (/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212 ).

Modify php. ini
Add an extension =/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/pdo_mysql.so

Restart service
> Service php-fpm restart

Original article address: Use phpize in centos to add extension libraries for PHP without re-Compiling. Thank you for sharing it with the original author.

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.