Sami Posted August 15, 2011 Report Share Posted August 15, 2011 Warning: mysql_query() [function.mysql-query]: Access denied for user 'kristfzz'@'localhost' (using password: NO) in /home/kristfzz/public_html/index.php on line 16Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/kristfzz/public_html/index.php on line 16Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/kristfzz/public_html/index.php on line 181. The username I've entered is kristfzz_1, and not just kristfzz2. I've entered a password!index.php:<?phpinclude("include/common.php");include("include/header.php");?><div id="content"><?phpif($_GET["r_http"]=="404"){?><h1>Siden kunne ikke bli funnet.</h1><?php}else{ $result = mysql_query("SELECT * FROM sites WHERE name='index'"); while($row = mysql_fetch_array($result)) { echo $row["content"]; }}?></div><?phpinclude("include/footer.php");?> common.php isn't importantdatabase.php <?php// connect$con = mysql_connect("localhost","kristfzz_2","******");if (!$con) { die('Debugging: ' . mysql_error()); } mysql_select_db("kristfzz_1", $con); ?> Link to comment Share on other sites More sharing options...
justsomeguy Posted August 15, 2011 Report Share Posted August 15, 2011 Where does database.php get included? Link to comment Share on other sites More sharing options...
Sami Posted August 15, 2011 Author Report Share Posted August 15, 2011 (edited) common.php on line 3 Edited August 15, 2011 by Sami Link to comment Share on other sites More sharing options...
justsomeguy Posted August 15, 2011 Report Share Posted August 15, 2011 It's not using that connection for whatever reason. I can't tell why from what you posted. If it says it's not using a password, it's not using a password. Those error messages indicate that it is trying to connect with default credentials. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now