php5.6.9 Adding Pdo_mysql Extensions

Source: Internet
Author: User

System: LINUX

PHP Version: php5.6.9

Here are the detailed procedures:

1. First, download the pdo_mysql extension source package. The download page is here: Http://pecl.php.net/package/PDO_MYSQL.
# wget Http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
2. Then unzip.
# TAR-ZXVF Pdo_mysql-1.0.2.tgz
3. Enter the extracted directory and execute the phpize.
#/usr/local/php/bin/phpize
Configuring for:
PHP Api version:20131106
Zend Module Api no:20131226
Zend Extension Api no:220131226
4. Makefile is generated below. The following two parameters must be added, I did not add at the beginning, the results are not found in the Php-config and MySQL header files.
#./configure--with-php-config=/usr/local/php/bin/php-config--with-pdo-mysql=/usr/local/mysql
5. Make a soft connection to the header file of MySQL before making it. Because MySQL installs the time to specify the directory, does not make the soft connection, still cannot find the header file.
# ln-s/usr/local/mysql/include/*/usr/local/include/
6. Then make and make install.
# make
# make Install
7. You will then be prompted as follows, meaning that the extension is installed in the following directory.
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-zts-20131226/
8. Modify the php.ini file (if you do not know the php.ini path can be found with Find/-name php.ini)
Modified: Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/" (Note: "/usr/local/php/lib/php/ extensions/no-debug-non-zts-20131226/"is the path configured in my server php.ini, if this path is not determined, you can phpinfo () check the" Extension_dir ", or directly copy the installation path of the output in step 7th)
Added: extension=pdo_mysql.so
9. Restart the httpd to reload the PHP configuration file

php5.6.9 Adding Pdo_mysql Extensions

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.