问题描述
大家好,
我在php,mysql中有一个很烦人的错误.我已经正确配置了所有内容,并且phpinfo()正确列出了所有内容.我写了一个简单的PHP页面并进行检查,效果很好.
然后我要配置MySql.在php.ini上启用所有扩展,然后尝试查看以下页面.
Hi all,
I have a quite annoying error with php, mysql. I''ve configured all the stuff properly and phpinfo() list all the stuff properly. I wrote a simple PHP page and check, works fine.
Then I want to configure MySql. Enable all the extension on the php.ini and try to view the following page.
<?php
$con = mysql_connect("localhost", "root", "sa");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
else {
echo 'Connected successfully';
}
?>
但这没有用.我检查了appache错误日志,并发现了以下内容.
But it didn''t work. I check the appache error log and found the following.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mysqli.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_firebird.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_oci.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_oci8.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0
所有扩展名也都在正确的路径中.不知何故,它不起作用.你们中有谁对此有解决方案...
All the extension are in correct path too. Somehow it didn''t work. Is anyone of you have a solution for this...
推荐答案
但这没有用.我检查了appache错误日志,并发现了以下内容.
But it didn''t work. I check the appache error log and found the following.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mysqli.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_firebird.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_oci.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_oci8.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0
所有扩展名也都在正确的路径中.不知何故,它不起作用.你们中有谁对此有解决方案...
All the extension are in correct path too. Somehow it didn''t work. Is anyone of you have a solution for this...
这篇关于PHP数据库连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!