Sami Posted August 15, 2011 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 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 Share Posted August 15, 2011 common.php on line 3 Link to comment Share on other sites More sharing options...
justsomeguy Posted August 15, 2011 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
Archived
This topic is now archived and is closed to further replies.