Fatal error when upgrading cpg14xx to cpg156 Fatal error when upgrading cpg14xx to cpg156
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Fatal error when upgrading cpg14xx to cpg156

Started by ouafouaf, June 15, 2010, 09:58:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ouafouaf

Hi all,

I guess I did a "basic" mistake during the upgrade :-\. I guess I screwed up the old theme or something like that. "Fatal error" and blank page since the upgrade. Unfortunately, I don't have any backup of my customised theme...
The site is http://www.pleinepuissance.com

Could somebody help me to recover my site?

Thank you in advance for your kind help.

Joachim Müller

Actual link to the gallery is http://www.pleinepuissance.com/cpg148/
To force the use of a default theme, use the URL parameter theme as explained in http://documentation.coppermine-gallery.net/en/theme_create.htm#theme_create_tipps - in your case, you could go to http://www.pleinepuissance.com/cpg148/?theme=curve to use the curve theme that comes with cpg1.5.x. However, as you can see, the fatal error doesn't go away when forcing the use of a theme that has been designed for cpg1.5.x, so there is something else wrong - your assumption that the error message comes from your theme is not correct. To figure out what actually is wrong, read up http://documentation.coppermine-gallery.net/en/errors.htm#errors_fatal and enable debug_mode as suggested there.

ouafouaf

Hi Joachim,

Thank you for your reply. Sorry for the link, you're right I forgot /cpg148. I forgot to mention that I could not even run the update. This error appeared before I could run the /update.php
Therefore, I can not access or activate the debug mode (I'm I right?)...My knowledge is too poor to understand the phpMyAdmin concept...
I'm completely lost...

Thanks again for your time.

Joachim Müller

Quote from: ouafouaf on June 15, 2010, 10:34:58 AM
Therefore, I can not access or activate the debug mode (I'm I right?)...
Wrong, you need to manually enable debug_mode
Quote from: ouafouaf on June 15, 2010, 10:34:58 AMMy knowledge is too poor to understand the phpMyAdmin concept...
We can't help you otherwise, so you better get familiar with it or ask a friend to help you with this. We can't help you otherwise.

ouafouaf

Thank  you. I managed to enable the debug mode manually through my provider.

Here's the result. Unfortunately, I still need your help to decode those eroor message...Sorry for that...

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 321

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


Thank you in advance for your efforts.

onthepike

There may be another way to do this, possibly without using phpMyAdmin, but on the other hand, this might be the perfect opportunity for you to get somewhat familiar with phpMyAdmin, an absolutely necessary tool when dealing with database driven applications such as Coppermine.

That said, you could first try to repair the table using the "Repair Table" prompt. If that fails, you could try rebuilding the table manually. Note however, your exact cpgxx database name may differ. Just be sure to select your cpg15x database.

Databases -> cpg15_ -> cpg15x_usergroups -> and visually verify that the table access_level exists. If it exists, modify the fields to reflect the following changes (if applicable; leave empty fields empty):

Field: access_level
Type: tinyint(4)
Collation:
Attributes:
Null: No
Default: 3
Extra:

If the table does not exist, you will have to manually add it.

Click the Structure tab from the top navigation menu.
Below Print view towards the bottom of the page, you'll find Add __ field(s). Leave the number 1 in the textarea and select the radio button After.
Using the pull-down menu immediately to the right of After, select priv_upl_need_approval and click Go.
Use the above outline to add the field values to the table and save your changes.

Return to your gallery and verify that this particular error is resolved. There may or may not be others, depending upon the extent of the corruption.

ouafouaf

Thank you !!

I added manually the missing field, followed your instructions, and returned to the gallery.

Here's the result :
----------
While executing query 'SELECT aid FROM cpg148_albums WHERE moderator_group IN (3)' in include/init.inc.php on line 268

mySQL error: Unknown column 'moderator_group' in 'where clause'
----------
I think we're progressing, isn't it?
Thank you again.


onthepike

Using the above as a guide, navigate to cpg15x_albums and insert/modify the following row after alb_password_hint:

Field: moderator_group
Type int(11)
Null: No
Default: 0

For any future errors, use the error message as your guide. It tells you the database, the table and the fields that are corrupt/missing.

ouafouaf

Thanks for your efforts, I really appreciate.

I added the moderator_group, as required (I think).
I understand your recommendations and see what you mean by "reading the error message". However, my knowledge is so poor in that matter that I would not dare changing anything without an advice.

The list of errors is bigger now. You can see it there : http://www.pleinepuissance.com/cpg148/

Thanks a million for helping me.

onthepike

Yes, you may have felt my collective ugh as I watched you make the above changes and was returned the following:

While executing query 'SELECT lang_id FROM cpg148_languages WHERE enabled='YES'' in include/init.inc.php on line 326
mySQL error: Table 'db169095152.cpg148_languages' doesn't exist


Well to be perfectly honest with you, I'm not sure table db169095152.cpg148_languages should exist. It should be cpg148_languages unless you have a different database structure than I. And that's possible. I'm not an expert.

Before I attempt to assist with this error, would you please post a screen shot of your cpg15x database listing from phpMyAdmin? Similar to this:


ouafouaf

Here's the snapshot.
To add a bit of difficulty, phpmyAdmin is in french...

Thanks again.

onthepike

You appear to be missing three entire tables and have an extra temp table possibly due to a failed upgrade. The cpg148_languages table is huge, but I think if we add the table with only English and French attributes, we might be able to get by as a prelude to a restoration update.

On the other hand, this current procedure seems endless. What if we take another approach and backup the anycontent.php and include/config.inc.php files, the /albums/ folder and a copy of this database and set them aside. Then re-download the package, FTP to your webspace and attempt to run update.php once again.

I don't know which approach is best, or if either will work. Therefore, I defer to those with more knowledge and await assistance as do you.

BTW the French version wasn't an issue. I simply wanted to verify the proper naming structure of your database tables.

ouafouaf

Good idea. Let's try to rerun the update.
I'll do that right now, and, of course, keep you posted!

Joachim Müller

Manually editing the database will be a time-consuming task. In fact you need to run the queries in sql/update.sql - just make sure to replace the prefix CPG_ with your custom table prefix cpg148_. Subsequently, the database query you need to run would be as in the attached file. You can do a copy-paste job from the file right into the query field of phpMyAdmin.

ouafouaf

Thanks Joachim for your time.

I did run the SQL query according to your file (copy/paste).

Please find enclosed the error msg I got. Did I miss a step?

onthepike

Quote from: Joachim Müller on June 15, 2010, 06:31:48 PM
You can do a copy-paste job from the file right into the query field of phpMyAdmin.

That's some pretty excellent support; attaching a custom sql query. Very nice.

@ ouafouaf, try running the language section first. I believe you can copy and paste sections you're missing. Language section begins CREATE TABLE IF NOT EXISTS cpg148_languages (.

ouafouaf

Thanks guys.

I did run the language section separately, worked fine, no error.
Then, I ran the rest, but the language (stupid?). See enclosed the result.
I have to admit it's more and more "blur" to me, I'm going into a completely unknown zone.
I tried to check my gallery, blank page, no message. However, i'm still in debug mode  ???

onthepike

We're making progress, but not enough to resolve it yet.

While executing query 'SELECT name, description, cid, thumb, depth, lft
       FROM cpg148_categories AS c
       WHERE depth BETWEEN 0 + 1 AND 0 + 2
ORDER BY c.lft' in index.php on line 315

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


So, in cpg_categories, after rgt add the field depth with these values:

Type: tinyint(3)
Attributes: UNSIGNED
Null: No
Default: 0

Although running the custom query should have already done this. Go here: http://www.pleinepuissance.com/cpg148/update.php?theme=curve and run the update and see what happens...

ouafouaf

Whaaa... I don't know how you got those screenshot, but I like it!!  ;)

I can't add the required field, as I do not see any "rgt" (see enclosed file).

onthepike

The screenshots are from your gallery taken a few moments ago.

Anyway, make these changes to your table (after thumb):