Pdo_mysql errors caused by the missing

Source: Internet
Author: User

Pdo_mysql errors caused by the missing

The previous period of time to build the system server, after uploading the Web project encountered a series of problems. The reason is that the missing pdo_mysql caused, as long as the database read connection to read the error, that is, when compiling and installing PHP did not add the module. The specific error is as follows:

Undefined class constant ' Mysql_attr_init_command

This allows us to install the Pdo_mysql extension Library (Note: there is no MySQL database installed here, so the compile time does not need to specify the path of MySQL installation) the following actions:

cd/data/ljm_yunwei/php-5.6.3/ext/pdo_mysql/(This is the PHP source path, not the installation path of PHP)

/usr/local/php/bin/phpize (execution)

./configure--with-php-config=/usr/local/php/bin/php-config
Make && make install

Edit PHP.ini

Vim/etc/php.ini

Add the following:

Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20131226/"
Extension = pdo_mysql.so (Opens the module)

Restart Nginx and PHP


This article is from the "I Am 喳喳" blog, please be sure to keep this source http://mydnjm.blog.51cto.com/11317639/1762974

Pdo_mysql errors caused by the missing

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.