You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 49 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - DB Errors - No Connection to DB [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
marsupillami
Private
Private


Joined: May 01, 2003
Posts: 42


PostPosted: Mon Aug 25, 2003 11:16 am Reply with quoteBack to top

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!
Find all posts by marsupillamiView user's profileSend private messageVisit poster's website
xfsunolesphp
Lieutenant
Lieutenant


Joined: Apr 05, 2003
Posts: 208

Location: Melbourne, FL

PostPosted: Mon Aug 25, 2003 11:21 am Reply with quoteBack to top

Please ReCheck DB info that assigned to your account.
Find all posts by xfsunolesphpView user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger
marsupillami
Private
Private


Joined: May 01, 2003
Posts: 42


PostPosted: Mon Aug 25, 2003 11:22 am Reply with quoteBack to top

Info is ok, because all the site works, except some modules (only this one and a block).
Find all posts by marsupillamiView user's profileSend private messageVisit poster's website
xfsunolesphp
Lieutenant
Lieutenant


Joined: Apr 05, 2003
Posts: 208

Location: Melbourne, FL

PostPosted: Mon Aug 25, 2003 11:32 am Reply with quoteBack to top

try include ("mainfile.php"); on top
Find all posts by xfsunolesphpView user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger
marsupillami
Private
Private


Joined: May 01, 2003
Posts: 42


PostPosted: Mon Aug 25, 2003 11:36 am Reply with quoteBack to top

Same error Sad
Find all posts by marsupillamiView user's profileSend private messageVisit poster's website
xfsunolesphp
Lieutenant
Lieutenant


Joined: Apr 05, 2003
Posts: 208

Location: Melbourne, FL

PostPosted: Mon Aug 25, 2003 11:58 am Reply with quoteBack to top

Try to re upload error.php and Did Your Import SQL File from ErrorManagerv21?
Find all posts by xfsunolesphpView user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger
marsupillami
Private
Private


Joined: May 01, 2003
Posts: 42


PostPosted: Mon Aug 25, 2003 12:25 pm Reply with quoteBack to top

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 Sad

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?
Find all posts by marsupillamiView user's profileSend private messageVisit poster's website
xfsunolesphp
Lieutenant
Lieutenant


Joined: Apr 05, 2003
Posts: 208

Location: Melbourne, FL

PostPosted: Mon Aug 25, 2003 12:34 pm Reply with quoteBack to top

don't try to modified mainfile.php only you know what you doing.

you might need to reupload mainfile.php
Find all posts by xfsunolesphpView user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger
marsupillami
Private
Private


Joined: May 01, 2003
Posts: 42


PostPosted: Mon Aug 25, 2003 4:45 pm Reply with quoteBack to top

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 Smile
Find all posts by marsupillamiView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.193 Seconds - 174 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::