LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1097|回复: 6

php中用mysql_connect()时出错。

[复制链接]
发表于 2004-1-29 17:05:27 | 显示全部楼层 |阅读模式
安装好mysql/apache/php后,phpinfo()可以用,                                                                              
但下面的脚本会有这样的提示:Fatal error: Call to undefined function: mysql_connect() in  ×××
这是为什么,难道这个函数还在声明吗?
<?php
  $link = mysql_connect("localhost", "root", "shg8718321")
       or die("Could not connect: " . mysql_error());
   print ("Connected successfully");
   mysql_close($link);
?>
 楼主| 发表于 2004-1-29 18:05:35 | 显示全部楼层
我在编辑时带了参数--with-mysql=/usr/local/mysql
 楼主| 发表于 2004-1-30 12:21:09 | 显示全部楼层
版本信息,
Linux redsea 2.6.0 #3 Mon Dec 22 08:40:44 CST 2003 i686
Apache 2.0 Filter
PHP Version 4.3.2
mysql 4.3.4

请大家多多帮助,真得很急。
发表于 2004-1-30 14:01:27 | 显示全部楼层
php编译的能支持mysql4.x吗?
发表于 2004-1-31 12:59:32 | 显示全部楼层
可能是少了php-mysql模块,我也是同样的问题
发表于 2004-2-23 00:25:40 | 显示全部楼层

我也有同样的问题呀

楼主解决了麽?
有谁知道怎么解决啊,小弟虚心请教!
发表于 2004-2-23 10:13:50 | 显示全部楼层
look for file libmysqlclient.so (should be included in php) and make sure it's in /usr/lib or /usr/local/lib.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表