Hi, I just got a problem, and I don´t know what can be its cause. I receive an error message, as you can see here, and have no clue why it happens. It also appeared in one block.
Quote:
Warning: mysql_query(): Access denied for user: 'nobody@localhost' (Using password: NO) in /home/oc-zone/public_html/error.php on line 31
Warning: mysql_query(): A link to the server could not be established in /home/oc-zone/public_html/error.php on line 31
Here´s the code which seems to have an error:
Code:
include("header.php");
global $nukeurl, $siteurl, $dbi, $prefix, $log_errors, $show_image, $rightblocks, $show_info_saved, $totalerrors;
if ($log_errors == 1) {
$time = date("D M d, Y g:i a");
// Build the current URL
$servername = getenv("SERVER_NAME");
$serverport = getenv("SERVER_PORT");
$current_url = getenv("REQUEST_URI");
$error_url= "http://".$servername.":".$serverport."".$current_url;
mysql_query("insert into erros values ('', '$error', '$time', '$error_url')");
//add 1 to the counter of total errors
$totalerrors = $totalerrors + 1;
sql_query("UPDATE erros_config SET totalerrors='$totalerrors'", $dbi);
}
// lets build the error page!
Could you help me please? Thank you!
xfsunolesphp Lieutenant
Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
Posted:
Mon Aug 25, 2003 11:21 am
Please ReCheck DB info that assigned to your account.
marsupillami Private
Joined: May 01, 2003
Posts: 42
Posted:
Mon Aug 25, 2003 11:22 am
Info is ok, because all the site works, except some modules (only this one and a block).
xfsunolesphp Lieutenant
Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
Posted:
Mon Aug 25, 2003 11:32 am
try include ("mainfile.php"); on top
marsupillami Private
Joined: May 01, 2003
Posts: 42
Posted:
Mon Aug 25, 2003 11:36 am
Same error
xfsunolesphp Lieutenant
Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
Posted:
Mon Aug 25, 2003 11:58 am
Try to re upload error.php and Did Your Import SQL File from ErrorManagerv21?
marsupillami Private
Joined: May 01, 2003
Posts: 42
Posted:
Mon Aug 25, 2003 12:25 pm
Yes, it was working, It has been working for about 4 months, just today it had this problem. I have been modifying mainfile.php, and some other files, also deleted some includes in the includes folder, things that I don´t use, such as forum, users stuff, etc... But I didn´t touch the mainfile for about 2 days, and just today noticed this problem
My db.php looks like this:
Code:
<?php
if ($inside_mod == 1) {
$the_include = "../../db";
} else {
$the_include = "db";
}
switch($dbtype) {
case 'MySQL':
include("".$the_include."/mysql.php");
break;
case 'mysql4':
include("".$the_include."/mysql4.php");
break;
}
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
message_die(CRITICAL_ERROR, "Não foi possível conectar à base de dados..... por favor tente mais tarde....");
}
?>
In the mainfile.php is there anything that is important in db connection?
xfsunolesphp Lieutenant
Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
Posted:
Mon Aug 25, 2003 12:34 pm
don't try to modified mainfile.php only you know what you doing.
you might need to reupload mainfile.php
marsupillami Private
Joined: May 01, 2003
Posts: 42
Posted:
Mon Aug 25, 2003 4:45 pm
Just solved it. It was something wrong in mainfile, started cleaning it from the beggining, and no longer get this error. Thank you for the help
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum