Kirk_Bishopp
06 Jul 2012, 01:44 PM
Hello,
I've setup a local copy of a php site in DW cs4. I have XAMPP installed and working (used a small test site to verify everything is working). I downloaded a copy of the site's DB and imported it into XAMPP and it seems to work... I took some SQL queries from the code of the site and ran them directly from phpMyAdmin and got results from them. I went into DW and set up a DB connection and when I test the connection (test button) it says the connection was made successfully. When I try to 'live view' the local copy of index.php I get a blank page with a message: "Could not connect to mysql. Please check your database settings." I also found where this message is originating from in config.php... there is an if statement that tests the connection:
if (!$conn->Connect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME) ) {
echo 'error here';
die();
I know the DB name is the same, I made sure to import it using the exact same name. When I set up the db connection in DW I used the user root and the pw that goes with that, but the site doesn't contain that info.
Where would I find out where the site specifies user and pw for the DB?
What is the DBHOST?
Thanks for any help you can provide.
Kirk
I've setup a local copy of a php site in DW cs4. I have XAMPP installed and working (used a small test site to verify everything is working). I downloaded a copy of the site's DB and imported it into XAMPP and it seems to work... I took some SQL queries from the code of the site and ran them directly from phpMyAdmin and got results from them. I went into DW and set up a DB connection and when I test the connection (test button) it says the connection was made successfully. When I try to 'live view' the local copy of index.php I get a blank page with a message: "Could not connect to mysql. Please check your database settings." I also found where this message is originating from in config.php... there is an if statement that tests the connection:
if (!$conn->Connect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME) ) {
echo 'error here';
die();
I know the DB name is the same, I made sure to import it using the exact same name. When I set up the db connection in DW I used the user root and the pw that goes with that, but the site doesn't contain that info.
Where would I find out where the site specifies user and pw for the DB?
What is the DBHOST?
Thanks for any help you can provide.
Kirk