Originally Posted by
Spinners Derek
When I try to go on my website as a customer would the following message comes up;- 'error establishing a database connection'.
Create a file called 'debugdb.php' with the following code. Replace the 'X's with the same data that you have in the configure.php file(s).
Code:
<?php
$server = "XXXXXXX"; // probably 'localhost'
$username = "XXXXXXXXXXXX";
$password = "XXXXXXXXXXXX";
$database = "XXXXXXXXXXXX";
$db = mysql_connect ($server, $username, $password);
if (!$db) {
die ('I cannot connect to the database because: ' .
mysql_error());
}
else {
mysql_select_db ($database);
print("connected OK");
}
?>
Save the file into the 'root' folder of your store. then execute this script by pointing your webbrowser to http://yourstore.com/debugdb.php
This should show you *why* the database connection can't be made.
Delete the file when you've finished debugging.
Cheers
RodG
Bookmarks