PHP compiled under linux add MySQL extension

Source: Internet
Author: User

PHP compiled under linux add MySQL extension

In the use of this problem occurs, look at the phpinfo found no MySQL extension.

The steps are as follows:

1 access to the PHP installation package directory

CD Php-5.6.22/ext/mysql

/usr/local/bin/phpize

./configure--with-php-config=/usr/local/bin/php-config--with-mysql=/usr/local/mysql/

Make

Make install

I saw mysql.so under the Mysql/modules.

2 modifying PHP.ini

Add extension = mysql.so

3 copy mysql.so to Extension_dir directory, Extension_dir set in php.ini

4 Restart Nginx to be ready.


This article is from "Linux Rookie growth" blog, please be sure to keep this source http://9040429.blog.51cto.com/9030429/1851989

PHP compiled under linux add MySQL extension

Related Article

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.