運行phpMyAdmin:
查看完整版本: 無法載入 mysql 擴展,<br />請檢查 PHP 配置
運行WordPress:
您的 PHP 好像並沒有安裝 MySQL 擴展,而 WordPress 需要它。
軟件版本:
apache_2.2.4
PHP Version 5.2.1,5.2.0也測試過,一樣不行
mysql-5.0.37 開始是5.1.5,後來換成這個也不成
中間機器也重新起過,每次修改都重新起apache,我算是服氣了。
可能的原因
1. extension_dir = 和PHP實際的ext目錄不一致。
extension_dir = “C:/php5/ext”,但是,我是一致的就是c:/php/5ext
2. 沒有把PHP目錄和ext目錄添加到環境變量中。
放了,PATH中包含;c:/php5;c:/php5/ext,機器也重新起過
3. extension=php_mysql.dll等前的;註釋沒去掉。
也去掉了,如
extension=php_mysql.dll
4.沒有把php_mysql.dll拷貝到system32目錄下
也拷貝了,包括libmysql.dll也都拷貝了
5.可能是寬字符原因?
解開php_mbstring.dll也不行(包括拷貝php_mbstring.dll文件到system32中)
6.添加了phprc也不行
C:/>echo %phprc%
c:/php5
但是,mysql是可以用的
C:>mysql -h localhost -u root -p Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1 Server version: 5.0.37-community-nt MySQL Community Edition (GPL) Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> select version(); +---------------------+ | version() | +---------------------+ | 5.0.37-community-nt | +---------------------+ 1 row in set (0.02 sec)