Author |
Message |
rickleigh
Worker


Joined: Jan 06, 2009
Posts: 183
|
Posted:
Wed Feb 25, 2009 8:44 am |
|
I'm using Advanced Backup v1.1 and noticed that the code needed in the footer.php file is causing errors. As far as I can tell the mod is making backups ok. The error in log file is:
PHP Fatal error: Call to a member function sql_query() on a non-object in /home/******/public_html/footer.php on line 86
Code that is in footer.php is:Code://start auto backup code
$result1 = $db->sql_query("SELECT autostate, autolast, autoinc FROM ".$prefix."_advbackup where id='1'");
$row = $db->sql_fetchrow($result1);
$autostate = $row['autostate'];
$last_back = $row['autolast'];
$autoinc = $row['autoinc'];
if ($autostate == "on"){
$rawtime = time();
if (($rawtime - $last_back) > ($autoinc * 3600) ) {
include("includes/dump.php");
}
}
//end auto backup code
|
Line 86 would be: $result1 = $db->sql_query("SELECT autostate, autolast, autoinc FROM ".$prefix."_advbackup where id='1'");
Is this happening from the upgrades done in RN2.3.1? |
|
|
|
 |
rickleigh

|
Posted:
Wed Feb 25, 2009 1:59 pm |
|
Did I stump you guys?  |
|
|
|
 |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Wed Feb 25, 2009 2:17 pm |
|
this comes from the "backup db" in the ACP
"Previous versions of PHP-Nuke and RavenNuke(tm) provided a backup routine that could be accessed from the Administrative Control Panel (ACP). In testing for the RavenNuke(tm) 2.20 release we found that (a) the program had serious bugs that produced invalid backup data and (b) in most server conditions, due to the expansion in the number and size of the MySQL tables, the backup process could not be run successfully."
If my memory serves me correctly, advanced backup has the same problems. Not that hard to use cPanel or equivalent to do the same task, look in your hosting control panel..... |
|
|
|
 |
Palbin
Site Admin

Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Wed Feb 25, 2009 3:11 pm |
|
Only thing I can think of is the $db isn't globalized. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
 |
gotcha
Regular


Joined: Mar 14, 2005
Posts: 91
|
Posted:
Wed Feb 25, 2009 5:59 pm |
|
You should probably get rid of that "Advanced Backup" Module... As the author, I can tell you that I haven't offered that file up for download for a few years now, and for several reasons. Mainly, the backups you make with it are no longer reliable in newer versions of MYSQL(in some cases they ca be fixed, but not very easily). It will also probably choke on large tables. This script is very old and I will not be updating it. DO NOT depend on this for you backups. Your host should be making backups for you on a regular basis. If they aren't, get a new host... I hear raven is a good one Otherwise, make other arrangements for your backups. Just thought I would warn you or anybody else thinking of using Advanced Nuke Backup.
On a side note, anyone with a site offering this script for download(I know there are quite a few) should consider removing it right away. |
|
|
|
 |
rickleigh

|
Posted:
Wed Feb 25, 2009 11:19 pm |
|
gotcha,
Thanks for the heads up. I will look to setup a cron Job in my cpanel. I don't know much about this tool yet and didn't want to make a mistake with a bad command. |
|
|
|
 |
|