coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Halfhidden on March 12, 2008, 04:46:00 PM

Title: [Solved]: Fatal Error in mod since upgrade 1.4.16
Post by: Halfhidden on March 12, 2008, 04:46:00 PM
Hi Everyone,
I'm busy putting a couple of mods back into play since the upgrade. I'm having fun and games with the Moderators mod by Abbas Ali (http://forum.coppermine-gallery.net/index.php/topic,26218.0.html)
Once the files from this mod have been uploaded to their respective folders (root, lang and includes) I get a fatal Error message (nothing more than the words fatal error:) whilst viewing the site in IE7.0.530. The same message is true when viewing the site in Opera Version 9.26 and Netscape Navigator 9.0.06. However Firefox 2.0.0.12 isn't affected by this and happily surfs away.
I've tracked this down to the init.inc.php file. I replaced it with a file I took as backup before the change and the site was restored when the init.inc.php file was replaced with the original. I know that Nibbler has worked on this file and I believe I placed the code change in the correct line. But obviously It's gone Pete Tong somewhere.
Regards,
Steff
Title: Re: Fatal Error in mod since upgrade 1.4.16
Post by: Nibbler on March 12, 2008, 04:48:21 PM
Enable debug mode to see the db error message and a diff viewer to see what the code change is in include/init.inc.php
Title: Re: Fatal Error in mod since upgrade 1.4.16
Post by: Halfhidden on March 12, 2008, 06:49:32 PM
Hi Nibbler,
I enabled debug and got the same error from the browsers that were troubled (firefox worked well)

While executing query "SELECT DISTINCT(aid) FROM cpg14x_albums WHERE moderator_group IN (3)" on 0

mySQL error: Unknown column 'moderator_group' in 'where clause'

I think looking at the error message that the table querry didn't create the new Moderators table or alter the cpg14x_albums table am I correct?

Here's the debug from the Coppermine site:

USER:
------------------
Array
(
    [ID] => 32959ce8801dec5bd74eab4453b86834
    [am] => 1
    [lang] => english
    [liv] => Array
        (
           
Title: Re: Fatal Error in mod since upgrade 1.4.16
Post by: Nibbler on March 12, 2008, 06:52:14 PM
Yeah, the field is missing on the albums table.
Title: Re: Fatal Error in mod since upgrade 1.4.16
Post by: Halfhidden on March 12, 2008, 06:53:52 PM
Thanks for the quick reply, I'll try to run the query again in myphp admin. and post the results.
Regards,
Steff
Title: Re: Fatal Error in mod since upgrade 1.4.16
Post by: Halfhidden on March 12, 2008, 07:08:34 PM
Ok. I looked and indeed the table isn't in the database. So I ran a query on my coppermine database with the following string

ALTER TABLE `cpg14x_albums` ADD `moderator_group` INT NOT NULL;

hit the submit query and nothing happened no table created. Is this normal behaviour for myphp admin? or should I try this query using some other way.
Regards,
Steff
Title: Re: Fatal Error in mod since upgrade 1.4.16
Post by: Halfhidden on March 12, 2008, 07:20:22 PM
Hi Nibbler, this has now been fixed. Turned out that table query on my sql has been experiencing problems and the database has just been moved to a new sql server. Ran the query and the table was created. Initial indications shows that the mod will work now. Thanks for your help again.
regards,
Steff
PS wicked work on 1.5 (I like it alot!)