| Author |
Message |
Mark
Guest

|
Posted:
Tue Dec 28, 2004 4:00 pm |
|
Fatal error: Call to a member function on a non-object in /var/www/html/footer.php on line 62
I get this when I access the Journal module. This is the line:
$result1 = $db->sql_query("SELECT autostate, autolast, autoinc F ROM ".$prefix."_advbackup where id='1'"); |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Tue Dec 28, 2004 4:51 pm |
|
This is a problem with the journal module. To fix it i just opened up functions.php inside the modules/Journal folder and changed this:
| Code: |
function journalfoot() {
include("footer.php");
} |
to this:
| Code: |
function journalfoot() {
global $prefix, $db;
include("footer.php");
} |
you are just adding the "global $prefix, $db;" part.
That should do it. Let me know if you have more problems!
Also make sure there is no space in the word FROM in the line you posted above. |
| |
|
|
 |
Mark
Guest

|
Posted:
Thu Dec 30, 2004 6:36 am |
|
Thanks, that fixed the Journal problem but now I see that Gallery also has the same error.
Any ideas as to where the bit of code I need to add is? |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Thu Dec 30, 2004 1:34 pm |
|
first undo the fix from above on journal.
next open up footer.php
find
| Code: |
//start auto backup code
$result1 = $db->sql_query("SELECT autostate, autolast, autoinc FROM ".$prefix."_advbackup where id='1'"); |
change to
| Code: |
//start auto backup code
global $prefix, $db;
$result1 = $db->sql_query("SELECT autostate, autolast, autoinc FROM ".$prefix."_advbackup where id='1'"); |
that should work in case any other modules aren't compatible |
| |
|
|
 |
Mark
Guest

|
Posted:
Fri Dec 31, 2004 9:13 am |
|
Thank you, that worked very nicely. |
| |
|
|
 |
Dean
Guest

|
Posted:
Thu Jan 13, 2005 3:15 pm |
|
I was about to post the same problem and saw this fix, applied it and found the desired results. Thank you so very much for this script!!!!!!! |
| |
|
|
 |
|
|