Home>Article>Backend Development> What should I do if php cannot open pdo?

What should I do if php cannot open pdo?

William Shakespeare
William Shakespeare Original
2021-07-09 09:00:56 2391browse

Solution to the problem that php cannot open pdo: 1. Remove the ";" symbol in front of "extension=php_pdo_mysql.dll" in php.ini; 2. Add the php path; 3. Modify the apache configuration file.

What should I do if php cannot open pdo?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

What should I do if php cannot open pdo?

Solution to the problem that the PHP7 PDO_MYSQL extension cannot be enabled under windows

The first step is to make sure you have removed the ";" in front of extension=php_pdo_mysql.dll in php.ini

Second step, make sure extension_dir = "D:/php/ext" is added to php.ini D:/php is your php path, and php_pdo_mysql.dll exists in the ext folder

If there are no problems with the above, then there is a problem with your apache configuration file

The third step is to add the PHP path PHPIniDir "D:/php"

in the apache configuration file httpd.conf Now, restart apache, refresh and you will see pdo_mysql

Recommended study: "PHP Video Tutorial"

The above is the detailed content of What should I do if php cannot open pdo?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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