Jump to content

Problems with Dreamweaver produced Connections code


IanMc

Recommended Posts

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. 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.