Fatal error: Call to undefined function mysql_connect() (用
<?php
$link=mysql_connect('localhost','root','netgy');
if(!$link) echo "fail";
else echo "success";
mysql_close();
?>
连接mysql 时报的错)
PHP安装目录下php.ini里面把 extension=php_mysql.dll 前面的 ;去掉
将 libmySQL.dll  php5ts.dll 两个文件拷贝到  windows/system32 下面
Apache的 httpd.conf 文件中的PhpIniDir的设置要指向Php安装目录  但是很挫败,数据库连接仍然出错,但是试其他的php程序是没有问题的,说明Apache和PHP的相关配置是对的,问题是MYSQL和PHP的配置
我在网上搜索了,有个是用下面的方法
 把 ../mysql/bin/libmySQL.dll  拷贝到 php5.0 下面,还有拷贝到 php5.0/ext 目录下
     因为libmySQL.dll  这个文件,它不是原php5.0下面自带的那个,而是 mysql 文件里带的libmySQL.dll 但我试了,还是不行!下面是一些信息System  Windows NT NETGY-LDX4ZDWVA 5.2 build 3790  
Build Date  Nov 8 2007 23:18:08  
Configure Command  cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"  
Server API  Apache 2.0 Handler  
Virtual Directory Support  enabled  
Configuration File (php.ini) Path  C:\WINDOWS  
Loaded Configuration File  C:\php\php.ini  
PHP API  20041225  
PHP Extension  20060613  
Zend Extension  220060519  
Debug Build  no  
Thread Safety  enabled  
Zend Memory Manager  enabled  
IPv6 Support  enabled  
Registered PHP Streams  php, file, data, http, ftp, compress.zlib  
Registered Stream Socket Transports  tcp, udp  
Registered Stream Filters  convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*  排查一个多小时,还没解决掉,这会是什么情况