回复: kiki_one(奇奇) 我照你说的去做了,还是不行呀错误如下: ------------------------------------------- Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\php\reg.php on line 10 PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Inetpub/php/ext/php_mysql.dll' - 找不到指定的模块。 in Unknown on line 0 这个文件php_mysql.dll 就在C:/Inetpub/php/ext/目录中为什么说"找不到指定的模块"呢?????????????????????????????????
主要是PHP在启动时没有找到php_mysql.dll文件,不能正常加载MySql服务. 你可以把php_mysql.dll复制到c:\windows\system32文件夹下 或者 添加"系统环境变量",具体如下: 右键单击我的电脑->属性->高级->环境变量->系统环境变量 a. 在“系统环境变量”选中Path使这一行处于高亮状态,然后选择“编辑”,在变量值的最后加上“;D:\php”(php.exe所在目录) b. “系统环境变量”->“新建”->变量名“PHPRC”->变量值“D:\php”(php.ini所在目录)->一路确定
(windows) You need to insert these lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .phpPHPIniDir "C:/php"
(windows) You need to insert these lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .phpPHPIniDir "C:/php"
./configure --mysql=mysql-dir
-------------------------------------------
Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\php\reg.php on line 10
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Inetpub/php/ext/php_mysql.dll' - 找不到指定的模块。 in Unknown on line 0
这个文件php_mysql.dll 就在C:/Inetpub/php/ext/目录中为什么说"找不到指定的模块"呢?????????????????????????????????
我的解决方法是重新下载PHP的非安装版,然后解开存好。再设一次PHP,特别是IIS中重新指定。就解决了。
你可以把php_mysql.dll复制到c:\windows\system32文件夹下
或者
添加"系统环境变量",具体如下:
右键单击我的电脑->属性->高级->环境变量->系统环境变量
a. 在“系统环境变量”选中Path使这一行处于高亮状态,然后选择“编辑”,在变量值的最后加上“;D:\php”(php.exe所在目录)
b. “系统环境变量”->“新建”->变量名“PHPRC”->变量值“D:\php”(php.ini所在目录)->一路确定
<?php
phpinfo();
?>
看看有没有装载?
或者在php.ini中指定extension_dir="c:/php/ext"
You need to insert these lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .phpPHPIniDir "C:/php"
You need to insert these lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .phpPHPIniDir "C:/php"