Yii (pdo) database connection error couldnotfinddriver solution

Source: Internet
Author: User
When yii was used today, a connection error occurred to the database and the couldnotfinddriver error was reported. it turns out that the php_pdo_mysql module of the database was not opened because yii operated data with pdo, so it is necessary to open the php_pdo_mysql module; the solution is as follows:

When yii was used today, an error occurred while connecting to the database and the cocould not find driver error was reported. it turns out that the php_pdo_mysql module of the database was not opened because yii operated data with pdo, to enable the php_pdo_mysql module, follow these steps: (from the network)

This error is reported when you debug a PHP program in windows. cocould not find driver

I used the PDO object in this program to connect to mysql 5. in the default settings of PHP, only the php_pdo module is enabled, and the php_pdo_mysql module is not enabled. therefore, the driver cannot be found. open this module and restart apache. of course, if you use another database, you can open the corresponding module.

Extension = php_pdo_mysql

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.