Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if php7 can't find the pdo extension?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "php7 can not find pdo extension how to solve", in the actual case operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

Php7 can not find the solution to the pdo extension: 1, open php.ini;2, remove the semicolon before "extension=php_pdo_mysql.dll"; 3, add the PHP path in the apache configuration file httpd.conf; 4, restart apache.

This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer

What if php7 can't find the pdo extension?

Pdo error could not find driver solution in php7.1:

Record your mistakes.

I.

1. The reason is that there is no pdo extension

2. Solution: open php.ini and remove the semicolon (;) before the following two lines of code. As follows

Extension=php_pdo_firebird.dllextension=php_pdo_mysql.dll

Second, but when I run the pdo link, I still report this error. In the end, I found that there was something wrong with my pdo link string, which led to the failure to connect. The reason is that the function of single quotation marks and double quotation marks is not understood, the variables under single quotation marks will not be parsed by php, and the variables under double quotation marks and without symbols will be parsed by php.

Solutions that cannot be enabled by PHP7 PDO_MYSQL extension under windows:

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

The second step is to make sure that extension_dir = "D:/php/ext" D:/php is added to php.ini as your php path, and that there is a php_pdo_mysql.dll in the ext folder

If there's nothing wrong with it, there's something wrong with your apache configuration file.

Third, add the PHP path PHPIniDir "D:/php" to the apache configuration file httpd.conf

All right, restart apache, refresh and you'll see pdo_mysql.

This is the end of the content of "what to do if php7 can't find the pdo extension". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report