Fatal error when upgrading from cpg1.4.25 to cpg1.5.8 Fatal error when upgrading from cpg1.4.25 to cpg1.5.8
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Fatal error when upgrading from cpg1.4.25 to cpg1.5.8

Started by JohnH, October 31, 2010, 03:58:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JohnH

Gallery URL: http://www.billyelliottheforum.me.uk/gallery/

Upgrading from 1.4.25 to 1.5.8 with no plug-ins.  Using FileZilla as FTP client.

I followed the upgrade docs and copied all of the files up to the server and tried to run update.php and got the generic Fatal error page.  Searching the forums I discovered that I should have disabled bridging before upgrading so I restored all of the 1.4.25 files, logged in and disabled the bridge.  I also followed the suggestion of deleting all the files in the gallery except for the albums folder and include/config.inc.php.

I uploaded all the 1.5.8 files and ran update.php.  It seemed to run for a few seconds with no output and then displayed the index page using the curve theme but it didn't ask me for a username/password.  As soon as I clicked on any of the links in the menu I got the generic Fatal error page.  Using the instructions at http://documentation.coppermine-gallery.net/en/errors.htm#errors_fatal I used phpMyAdmin to enable debug_mode.  The debug output gave me the error: mySQL error: Unknown column 'access_level' in 'field list'.

I started working through the suggestions in this post: http://forum.coppermine-gallery.net/index.php/topic,65521.0.html and taking the advice offered by Joachim in this post I started running all the queries in sql/update.sql using phpMyAdmin.  I got errors on some of the queries (sorry dev team but it was now 2am and it didn't occur to me to keep a record of the error messages) but my years of fiddling with various flavours of SQL allowed me to rectify all the errors except one.

When I run the query
ALTER TABLE cpg_filetypes DROP INDEX `EXTENSION`, ADD PRIMARY KEY ( `extension` );

I get the error message
#1091 - Can't DROP 'EXTENSION'; check that column/key exists

I have checked the structure of cpg_filetypes and the field 'extension' exists.

I don't know if it helps or not but I also ran
SHOW INDEX FROM `cpg_filetypes'

and got the following
Table       Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
cpg_filetypes 0        PRIMARY               1 extension       A    105          NULL          NULL   BTREE


Can I get away without running this query or can some tell me what is wrong with it/my database?

The gallery seems to be working now in that I am no-longer getting the fatal error message and I am able to log in.  However versioncheck.php is reporting a lot of the files (501) as having been modified so I'm going to re-upload all of the files showing an error with a fresh download of 1.5.8.

JohnH

Some additional information:

Now that I've had time to look properly at the gallery all is not well.  I can change the theme in the config and it remembers my selection but the theme isn't activated, it stays on the curve theme.

Also the front page isn't showing any categories or albums, just the latest additions.  When I select a thumbnail from the latest additions it takes me to the intermediate picture but the breadcrumb list is showing all the categories & albums inside one another.

I have included 2 screen shots of this, one of the front page and the other showing the crazy breadcrumb.

Anyone have any ideas of where I go from here?

Thanks,

John

Nibbler

Theme changing works for me. Clear your cookies.
The messed up categories are a result of not having run update.php. Create a new category and then it will sort itself out.

JohnH

Nibbler you're an absolute star! :)  I couldn't see the wood for the trees, didn't think of clearing the cookies!

Should I have another go at running update.php even though I got all but one SQL query to work?  Would it do any harm?

JohnH

I re-ran update.php while logged in as admin and it worked.  It seemed to fix the last remaining glitches and so I'm marking this as solved.