Home > PHP Framework > YII > body text

An error message appears when creating a model in yii

王林
Release: 2020-02-20 15:05:03
Original
2290 people have browsed it

An error message appears when creating a model in yii

Problem:

Such an error occurs when using gii in Yii to create a Model:

CDbConnection failed to open the DB connection: could not find driver
Copy after login

Cause analysis:

This It's because the PDO extension is not enabled in your php.ini file.

(Recommended related article tutorials: yii framework)

Solution:

Just turn on the extension.

;extension=php_pdo.dll
;extension=php_pdo_mysql.dll
Copy after login

Remove the two semicolons here.

Of course, the prerequisite for this is that you have installed the PDO extension on the Linux server, and then opening the comments in php.ini will be effective.

For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of An error message appears when creating a model in yii. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!