Home>Article>Backend Development> What should I do if php cannot open pdo?
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.
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!