PHP 5.2.0 and MySQL problems
| From: | Matt Banks | Date: | Mon, 15 Jan 2007 01:30:53 +0000 |
| Subject: | PHP 5.2.0 and MySQL problems | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-17820@lists.php.net to get a copy of this message | ||
I'm trying to set up a testing machine (Windows XP, IIS), with PHP, MySQL,
and various other languages. I got PHP and MySQL individually installed
fine, but PHP (v5.2.0) doesn't seem to want to work with MySQL (v5.0.27). I
un-commented the extension=php_mysql.dll in php.ini, and also copied
libmysql.dll to C:\Windows\system32.
I tried to execute a test script:
<?php
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';
// username and password to log onto db server
$dbUser='root';
$dbPass='';
// name of database
$dbName='test';
$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or
die("Could
not connect");
print "Connected successfully<br>";
mysql_select_db("$dbName") or die("Could not select database");
print "Database selected successfully<br>";
// close connection
mysql_close($link);
?>Here's the output that is generated:Fatal error: Call to undefined
function mysql_connect() in C:\Inetpub\wwwroot\db.php on line 12Can anyone
help me out?Thanks,Matt