forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: profili on January 01, 2011, 11:30:52 pm

Title: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 01, 2011, 11:30:52 pm
Hello,
I have followed the instuctions of the upgrade process in one of my galleries, but it seems that something is going wrong and this gallery wont upgrade. Instead i got a simple error message and a blank page. Have searched around and I think I have the same problem as this here http://forum.coppermine-gallery.net/index.php/topic,65521.0.html
I have turned the debug mode on following this guide here http://documentation.coppermine-gallery.net/en/errors.htm#errors_fatal

And here we are:

Code: [Select]
While executing query 'SELECT MAX(group_quota) AS disk_max, MIN(group_quota) AS disk_min, MAX(can_rate_pictures) AS can_rate_pictures, MAX(can_send_ecards) AS can_send_ecards, MAX(can_post_comments) AS can_post_comments, MAX(can_upload_pictures) AS can_upload_pictures, MAX(can_create_albums) AS can_create_albums, MAX(has_admin_access) AS has_admin_access, MAX(access_level) AS access_level, MIN(pub_upl_need_approval) AS pub_upl_need_approval, MIN( priv_upl_need_approval) AS  priv_upl_need_approval FROM cpg148_usergroups WHERE group_id in (3)' in bridge/udb_base.inc.php on line 323

mySQL error: Unknown column 'access_level' in 'field list'

But I don't know what to do with these codes, I don't understand anything there.

Please someone help me how to fix these problems.
The site http://www.galsh.com/

Thank you...
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 02, 2011, 12:45:03 pm
Please some help here!  :-[
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 11:26:17 am
Run update.php.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 01:02:44 pm
Run update.php.

I did it more than once, http://www.galsh.com/update.php
But again, the same problem. http://www.galsh.com/
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 01:44:37 pm
Make sure you have completely replaced the update.php file and all files in the sql directory. If it still doesn't work, perform the commands of sql/update.sql manually, especially that line:
Code: [Select]
ALTER TABLE CPG_usergroups ADD access_level tinyint(4) NOT NULL default '3';
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 02:59:13 pm
Make sure you have completely replaced the update.php file and all files in the sql directory.

Did those since the first time but still nothing.

Quote
If it still doesn't work, perform the commands of sql/update.sql manually, especially that line:
Code: [Select]
ALTER TABLE CPG_usergroups ADD access_level tinyint(4) NOT NULL default '3';

How do i do this?

Your help is very appreciated. Thank you.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 03:23:21 pm
Use a tool like phpMyAdmin.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 03:52:19 pm
Use a tool like phpMyAdmin.

Ok, but how do I perform the commands of sql/update.sql manually?

Thank you.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 04:11:34 pm
Replace the table prefix CPG_ with your actual table prefix and copy it to the execution box (I don't know how it's called or where it is in phpMyAdmin, as I personally don't use it).
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 04:45:56 pm
Replace the table prefix CPG_ with your actual table prefix and copy it to the execution box (I don't know how it's called or where it is in phpMyAdmin, as I personally don't use it).

Maybe SQL query on database? Like this in the screenshot?
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 04:46:58 pm
Try the 'SQL' tab.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 04:52:58 pm
Did it.

Code: [Select]
While executing query 'SELECT COUNT(*) FROM cpg148_categorymap WHERE group_id in (3)' in bridge/udb_base.inc.php on line 340

mySQL error: Table 'gsh_galeria.cpg148_categorymap' doesn't exist

This is now the new message from the debug mode.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 05:01:43 pm
You have to run all commands that are in sql/update.sql (= the whole file).
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 05:21:59 pm
Everything in sql/update.sql or just one part of it?
Yes you said (= the whole file), but I need to be sure and not ruin the database.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: lurkalot on January 03, 2011, 06:05:34 pm

but I need to be sure and not ruin the database.


As always,  Please do yourself a favour and back up your database first.  Then if it goes wrong you can restore it. ;)
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 06:38:31 pm
Yes everything.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 08:44:03 pm
It wont work!

Code: [Select]
Error

SQL query:

# Create temporary table to store messages carried over from one page to the other
CREATE TABLE CPG_temp_messages(
message_id varchar( 80 ) NOT NULL default '',
user_id int( 11 ) default '0',
time int( 11 ) default NULL ,
message text NOT NULL ,
PRIMARY KEY ( message_id )
) COMMENT = 'Used to store messages from one page to the other';

MySQL said: Documentation
#1050 - Table 'CPG_temp_messages' already exists
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: phill104 on January 03, 2011, 08:44:38 pm
At this point I think you should restore to 1.4.x from your backup then begin again. Did you disable your bridge and all plugins before you started?
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 09:07:13 pm
I had no bridge installed and yes I have disabled the plugins before the begin of the upgrade. To restore a copy of the 1.4 version should be impossible, because I don't have it. Yes is stupid, but I haven't downloaded a copy of the DB before the update.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: phill104 on January 03, 2011, 10:19:32 pm
I cannot promise I can hel here but please could you email me a copy of your database if it is not too large and I will try and do something. Again, I cannot promise anything.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 10:59:37 pm
Just ignore error message like 'already exists' and execute the next line(s). That's exactly the same what update.php does, too. Execute every line one by one and it should be fine. Have a look at error messages that don't tell you something like 'already exists'.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 11:06:29 pm
Just ignore error message like 'already exists' and execute the next line(s). That's exactly the same what update.php does, too. Execute every line one by one and it should be fine. Have a look at error messages that don't tell you something like 'already exists'.

André, thank you for your help and your time. But I don't understand you man! You said that I have to add the whole update.sql to that SQL thing in the phpMyAdmin, and that is what i did. Now, what do you mean with "and execute the next line(s)"? Sorry if I'm wasting your time.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 03, 2011, 11:07:56 pm
Execute every command one by one. A comment usually starts with CREATE, UPDATE, DROP or INSERT.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 03, 2011, 11:16:48 pm
Execute every command one by one. A comment usually starts with CREATE, UPDATE, DROP or INSERT.

All these above are Klingon language for me :)
Is it too much if I give you give me your contact address (I can't send PMs here) where I can send you all the credentials to enter my host space and take a look?
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 04, 2011, 09:02:55 am
Sorry, but I don't know what's the problem of copying each SQL command (google for it if you don't know where an SQL statement starts and ends) and paste it to the 'SQL' tab of phpMyAdmin. Please re-read the thread you referred to in your initial post. There are a lot of hints how you deal with your issue. Joachim even posted a customized sql file.

You can also try if this works: http://www.galsh.com/update.php?theme=curve
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 04, 2011, 10:17:01 am
Ok, I tried with that file from Joachim posted here (http://forum.coppermine-gallery.net/index.php/topic,65521.msg325640.html#msg325640).

Now the phpmyadmin gives this error:

Code: [Select]
Error

SQL query:

# --------------------------------------------------------
ALTER TABLE cpg148_filetypes DROP INDEX `EXTENSION` ,
ADD PRIMARY KEY ( `extension` ) ;

MySQL said: Documentation
#1091 - Can't DROP 'EXTENSION'; check that column/key exists

And from the gallery is this message to see:

Code: [Select]
While executing query 'SELECT aid FROM cpg148_albums WHERE moderator_group IN (3)' in include/init.inc.php on line 271

mySQL error: Unknown column 'moderator_group' in 'where clause'
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: Αndré on January 04, 2011, 10:38:36 am
And from the gallery is this message to see:

Code: [Select]
While executing query 'SELECT aid FROM cpg148_albums WHERE moderator_group IN (3)' in include/init.inc.php on line 271

mySQL error: Unknown column 'moderator_group' in 'where clause'
Well, you get an error, that the column 'moderator_group' doesn't exist. So you'll search for that word in the sql file and execute that commands. Do that as long as you get error messages (not just this error message, but all other following error messages, too).
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: profili on January 04, 2011, 10:43:48 pm
Thank you André. My gallery is now updated and is working quite ok. Thank you again.
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: freako on January 06, 2011, 12:07:31 pm
Ive the same Problem now at my Site Auto mieten (http://www.auto-ready.com/).
Can someone give a fix, at google i nothing found

best regards
Title: Re: "Fatal Error" after upgrade from 1.4.24 to 1.5.10
Post by: phill104 on January 06, 2011, 05:45:14 pm
That is not a coppermine driven page nor should you hijack someone elses thread. If you have a CPG driven page then we can help, if not I will delete your post.

Locking