apache2.4不支持mysql,带有PHP 5.4的Apache 2.4:没有可用的MySQL

I've set up an Apache 2.4 HTTP Server with PHP 5.4 and MySQL 5.5 on my Windows 7 x64 machine.

Everything works fine, except that in PHP only the "mysqlnd" is loaded. mysql and mysqli are missing. The entries in the php.ini are available and active. The PATH variable is appended to the directory of the mysql binary files (libmysql.dll).

There are no entries about warnings or errors in the error.log of Apache 2.4

Does someone have an idea?

解决方案

I had the same troubles yesterday, after settig up Apache 2.2 and PHP 5.4.6 on my Windows 7 64-bit machine. I resolved this with the following changes in the php.ini:

Setting the extension_dir to (your-php-path)\ext.

extension_dir = "c:\progra~2\php546\ext"

You can avoid the whitespaces in the foldername Program Files (x86) when you use the 8.3 version of the foldername. You can get it with the following command:

dir \prog* /x

Enable the wanted MySQL module(s).

extension=php_mysql.dll

extension=php_mysqli.dll

...

extension=php_pdo_mysql.dll

Restart Apache Web Server.

for %s in (stop start) do net %s apache2.2

You can also use the Apache Monitor or the Services to restart it.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值