【发布时间】:2014-12-17 14:23:29
【问题描述】:
-
我的 php.ini 文件中有以下两个
extension=php_mysql.dll extension=php_mysqli.dll -
从php.info(),可以看出下面是正确的。
Loaded Configuration File C:\Program Files (x86)\PHP\v5.3\php.ini 我只安装了一个版本的 php。
我还应该尝试什么?
奇怪的是,如果我加载我的应用程序,错误是
致命错误:调用未定义函数 mysql_connect()
但如果我加载 phpMyAdmin,登录后错误是
The mysqli extension is missing. Please check your PHP configuration.
<a href="Documentation.html#faqmysql" target="documentation"><img class="icon" src="./themes/pmahomme/img/b_help.png" width="11" height="11" alt="Documentation" title="Documentation" /></a>
【问题讨论】:
-
使用xampp或者Easyphp或者类似的软件可以帮助o_o
-
如果您对任何
.ini/系统文件进行了任何更改,那么您需要重新启动包括Apache在内的所有服务。还添加错误报告。如果可能,请尝试全新安装,并确保您的文件为.php。我注意到那里有一个.html链接。 -
当你看到,phpinfo 是正确的,你的意思是,你看到了其中的 2 个扩展?并且不要忘记,在 windows 下,这些 dll 有依赖,有时这会导致错误:
libmysql.dll和libmysqli.dllphp.net/manual/en/install.windows.extensions.php -
嗨,我正在使用 IIS。 iisreset,mysql重启了吗。问题不在这里。
-
您应该会在 phpinfo 显示中看到该信息。如果没有,您需要重新启动服务器。