note 34994 added to function.mysql-connect
| From: | Eduard at rack1 dot php dot net | Date: | Thu, 14 Aug 2003 14:02:47 +0000 |
| Subject: | note 34994 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54160@lists.php.net to get a copy of this message | ||
If you find the anoying error:
Fatal error: Call to undefined function: mysql_connect()
And you are sure enough php has been compiled with mysql (you can run phpMyAdmin in that site, for
example) surely php has been compiled with --with-mysql=shared.
In this case you must load the mysql.so library prior to use any mysql function.
Use
if (!extension_loaded("mysql.so")) dl("mysql.so");
$db=mysql_connect($hst,$user,$passwd);
mysql_select_db($dbname,$db);
to prevent this problem.
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34994
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34994&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34994&report=yes