IanMc Posted March 16, 2015 Share Posted March 16, 2015 I was recently stuck with a project due to Dreamweaver's Server Behaviour's coding, but Nosey Moderator kindly helped me out despite a dislike of DW! I now seem to have another. All my pages and code work fine using my PC local server, but won't work on my ISP's server. I'm told by my ISP that the problem is flagged up as "Access denied for user 'root'@'localhost' (using password: YES)" "the application is trying to connect using "root@localhost which is the incorrect username, if you update the code to the database user details this will correct it for you". The code in the Connections folder is <?php # FileName="WADYN_MYSQLI_CONN.htm" # Type="MYSQL" # HTTP="true" $hostname_graveyard = "localhost"; $database_graveyard = "graveyard"; $username_graveyard = "User name"; $password_graveyard = "Password"; @session_start(); $graveyard = new mysqli($hostname_graveyard, $username_graveyard, $password_graveyard, $database_graveyard); ?> The username and the password I have in the active file are correct. I've tried using the site's URL in place of Localhost but that doesn't work. Is this a Newby fault or another Dreamweaver issue .... or both. Thanks. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted March 16, 2015 Share Posted March 16, 2015 it's possible that the posted code isn't even where the error is coming from. you need to determine for yourself where in your code the error is occurring at. for debugging purposes, add the following two lines of code, immediately after the line with the first opening <?php tag in your main file being requested - ini_set("display_errors", "1"); // display errors error_reporting(-1); // report all errors also, remove the @ error suppressor on the session_start() statement. if you are getting any errors on the session_start() you will want to know so that you can find an fix them, rather than to hide them. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted March 17, 2015 Share Posted March 17, 2015 Besides what mac_gyver has given you try adding some echo statements to your code to show you exactly what is being done with what values. echo out the parms of your connection statement and let's see if you are actually running that code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.