Home  >  Article  >  Backend Development  >  Unable to load mysql extension please check PHP configuration_PHP tutorial

Unable to load mysql extension please check PHP configuration_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:57:13868browse

Today when configuring the apache and php environments, I personally felt that the configuration was good. I wrote the test php files myself and they could be executed successfully, but when running When phpMyAdmin prompts that the mysql extension cannot be loaded,
please check the PHP configuration. Later, after troubleshooting, the solution was found. I will share it with you below. Home.

The environment is configured and my test file looks like a.php

The code is as follows
 代码如下 复制代码

echo phpinfo();

$cn = mysql_connect('localhost','ttftroat','xxx') or die(mysql_error());
?>

Copy code

echo phpinfo();

$cn = mysql_connect('localhost','ttftroat','xxx') or die(mysql_error());

?>

There is no problem with the input results, but when I use phpmyadmin, I get a prompt

phpMyAdmin - Error



Unable to load mysql extension,
Please check PHP configuration - Documentation

Solution
Search for "extension_dir = ./", change it to "extension_dir = C:phpext", and then remove these semicolons:

extension=php_mbstring.dll extension=php_mysql.dll Restarting apache will solve the problem. http://www.bkjia.com/PHPjc/632106.html
www.bkjia.com
true
http: //www.bkjia.com/PHPjc/632106.htmlTechArticleToday when configuring the apache and php environment, I personally feel that the configuration is good, and I can write test php files successfully. It was executed, but when running phpMyAdmin, it prompted that the mysql extension could not be loaded...
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