I have installed PHP 5, Apache and MySQL on my machine, which runs on Windows Vista.
Apache tells me it's working (at http://localhost/), and the status bar in the Apache Service Monitor tells me it's connected to PHP/5.2.10.
However I seem to be having problems connecting to my database. I am using a simple php page to test the connection to the database, but it just returns a blank page, which has nothing in the source code. My test.php file is:
<?php
$mysqli = new mysqli("localhost", "root", "password", "db");
if (mysqli_connect_errno()) {
printf("Connection failed: %s\n", mysqli_connect_error());
exit();
}
else {
printf("Host information: %s\n", mysqli_get_host_info($mysqli));
mysqli_close($mysqli);
}
?>
I can use MySQL on the database through a MySQL Line Client, so I'm not sure where the error is - I think it may be in the php.ini file? I have not altered it yet.
After many hours of googling the problem, and reinstalling everything, I'm getting a bit fed up. I have added the PHP directory to the windows path. Any help will be greatly appreciated!
Cheers.