Re: Cannot connect to Database
| From: | Marek Kilimajer | Date: | Thu, 27 Jan 2005 16:07:11 +0000 |
| Subject: | Re: Cannot connect to Database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207498@lists.php.net to get a copy of this message | ||
Supersky wrote:
Hello, I'm using the following statements to connect to a database. <?php $conn = mysql_connect('localhost', 'root', '') or die ("Can't Connect To Database"); $db = mysql_select_db("testDB", "$conn") or die ("Can't Select Database". mysql_error()); ?> But I cannot, and I see Fatal error: Call to undefined function mysql_connect() in .... My OS is WinXP, I have installed Mysql 4.1, Apache 2.0.52, and PHP 5.03. Apache and PHP work well if I don't connect to a database. Please any help or suggestions are welcome. Thanks! Ganuncomment mysql.dll in your php.ini and restart apache