问题描述
我很茫然.我在Windows 7上,同时安装了Apache 2.2.21和PHP 5.2.17.我无法启用mysql模块. Windows 7上存在一个已知问题吗?
I'm at a loss. I'm on WIndows 7 and have installed both Apache 2.2.21 and PHP 5.2.17. I can not enable the mysql module. Is there a known issue on Windows 7?
我已经运行php --info并看到以下内容:
I've run php --info and see the following:
C:\php>php --ini
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: C:\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
我还在php.ini中设置了扩展目录:
I've also set my extension dir inside php.ini:
extension_dir = "C:\php\ext"
我还向我的httpd.conf文件中添加了一个条目:
I've also added an entry to my httpd.conf file:
# configure the path to php.ini
PHPIniDir "c:/php"
是的,在我的php.ini文件中,我启用了php_mysql扩展名并重新启动了我的Web服务器.
And yes, inside my php.ini file I've enabled the php_mysql extension and restarted my web server.
我想念什么?
推荐答案
您是否尝试过将php_mysql.dll放在C:\ windows \ system32目录中?如果将文件放在此处,重新启动Web服务器并加载了模块,则可能意味着环境变量问题,或者旧版本的php_mysql.dll阻止了新文件的正确加载.
Have you tried putting php_mysql.dll in C:\windows\system32 directory? If you place the file there, restart your webserver and the module is loaded, then it could mean an environment variable issue, or an old version of php_mysql.dll is preventing the new one from being loaded properly.
这篇关于PHP没有看到mysql扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!