[MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = On; Maximum number of persistent links. -1 means no limit. mysql.max_persistent = -1; Maximum number of links (persistent + non-persistent). -1 means no limit. mysql.max_links = -1; Default port number for mysql_connect(). If unset, mysql_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ' at MYSQL_PORT. mysql.default_port =; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysql.default_socket =; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host =; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user =
如果提示没有定义的话.mysql配置可能不对.
mysql_connect("localhost","root","password");
http://www.sh7135.com/temp/phpinfo.htm
检查:
php.ini里关于mysql设置的内容
; Allow or prevent persistent links.
mysql.allow_persistent = On; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
' at MYSQL_PORT.
mysql.default_port =; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
http://cn.php.net/release_4_2_1.php
下载其他版本的PHP试一试
重新编译一下,同时检查一下编译时是否把mysql的部分包含进去了。
没有mysql支持的样子……
在安装目录里头(系统安装)