I cannot get PHP to recognize my instance of MySQL.
I'm running Windows XP Pro, and I've just installed PHP 5.2.5 and MySQL 5.0.51a. Both installed fine, and I'm able to get to phpinfo.php without any trouble. I also can access and work with the databases on my computer using Navicat. When I installed PHP, I told it to include these extensions:
- Activescript
- classkit
- Curl
- GD2
- IIS Administration
- MySQL
- PDFlib
- POP3
- SMTP
- SOAP
- Standard PHP Library, Types Addon
- uploadprogress
However, I cannot get PHP to locate the databases. I run this:
$host = "localhost";
$dbase = "myDatabase";
$user = "root";
$password = "[password]";
$link = mysql_connect($Host, $User, $Password) or die('I cannot connect to the database because: ' . mysql_error());
... and nothing happens. I can echo out anything before the $link but cannot echo out anything after the $link. In the php.ini file, I have:
error_reporting = E_ALL; display all errors, warnings and notices
display_errors = On
display_startup_errors = On
But I don't get any errors or anything.
Any ideas as to what I'm missing?
Thanks.