Re: invalid function: mysql_connect
| From: | Janet Valade | Date: | Wed, 22 Sep 2004 16:38:32 +0000 |
| Subject: | Re: invalid function: mysql_connect | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-24629@lists.php.net to get a copy of this message | ||
Catapult Webmaster wrote:
i would just like to ask if i have missed anything in the installation (e.g. configuration for MySQL connectivity) because the ff. piece of code always returns "Fatal error: Call to undefined function mysql_connect() in F:\xitami\catapult\index.php on line 13." This is the part of my code that's causing the error (the whole file is saved as test.php): <?php $user = ""; $pswd = ""; $link = mysql_connect("localhost", $user, $pswd); if (! $link) die("Could not connect to MySQL."); print "Successfully connected to the server.<br>"; mysql_close($link); ?> Quick info on my current environment: OS: Win XP SP1, MySQL ver 4.0.20d, PHP 5.0.1, Xitami 2.5b4 However, I would like to inform you that the ff. works (saved as php_set.php): <?phpDoes the phpinfo() output show that MySQL support is activated? If not, perhaps you need to uncomment the line ;extension=php_mysql.dll (remove the ;) in your php.ini file. You may need to restart your web server after changing the line. Janetphpinfo();?> ... as well as connecting to MySQL through the command prompt (i am able to create/update/select databases)...