linux mysql php 安装步骤_PHP: 安装 - Manual

i've experienced a similar (if not the same) problem.

to enable the mysql_... and mysqli_... funtionality, i opened the php.ini file to uncomment the following lines:

;extension=php_mysql.dll

;extension=php_mysqli.dll

;extension=php_pdo_mysql.dll

but phpinfo() still stated that no mysql extensions were loaded.

i tried the fixes and suggestions above with no success.

so i invoked the windows shell and typed ("Path" environment variable set to the PHP & MySQL directories):

php.exe -m

this returned the following error: "PHP Startup: Unable to load dynamic library 'C:\php5\php_mysql.dll' - Module not found."

this told me that PHP didn't recognize what i thought was the extensions directory. it searched all other places first (sys-dir, workin'-dir, the MySQL "bin" dir because of the "Path" variable set, and even a curious directory "C:\php5" that doesn't even exist on my mashine) but not the expected "ext" directory.

so the fix was to go to "php.ini" again and uncomment the following line:

;extension_dir="ext"

this fixed it for me.

so if module loading is done improperly, first of all check the "Path" environment variable and the "php.ini" file - especially the "extension_dir" config value - and check if all values are set to their correct values.

hope this helps any1.

----------------------------------------

OS: Win7 Ultimate x86

Apache v2.2.16

PHP v5.3.3

MySQL v5.1.50

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值