Home >Backend Development >PHP Problem >What should I do if php pdo cannot find the driver?

What should I do if php pdo cannot find the driver?

藏色散人
藏色散人Original
2021-03-25 10:31:262795browse

php pdo cannot find the driver solution: 1. Place "pdo_mysql.dll" in the system32 system directory; 2. Configure the PHP installation directory as an environment variable.

What should I do if php pdo cannot find the driver?

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

php pdo mode connection problem-driver not found

Problem description:

When I configured php.int, I clearly opened pdo_mysql.dll, but when I used PDO to connect to the DB, an error was reported that mysql driver was not found. Less than

Solution:

1. Place pdo_mysql.dll in the system32 system directory

2. Configure the Php installation directory as the environment Variable

[Recommended learning: PHP video tutorial]

The above is the detailed content of What should I do if php pdo cannot find the driver?. 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