Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: glycerine on March 06, 2011, 10:16:33 am

Title: Fatal error 1.4.27 to 1.5.12
Post by: glycerine on March 06, 2011, 10:16:33 am
Hey everyone.
I have to tried to upgrade my gallery from 1.4.27 to the latest version 1.5.12, and kept running into fatal error problems (the first being the acces_levels one)
I followed most of this thread here:,65521.0.html  because it seems mosted similar to my problems)

what I did after I first tried to install it and it didn't work, is I reuploaded the 1.4.27 files, t hen the gallery seemed to work again

I started over:
- made a backup of the database, and had the config file point to that one (so now, i still have my 1.4.27 database online should things go wrong again)
- disabled all the plugins
- removed every file with ftp (Filezilla), uploaded all the new files from 1.5.12
- ran the update again

but again, I kept bumping into the same problems (it seemed like my database wasn't taking any of the updates?)

What I did was, I followed the steps in the thread I posted above (,65521.0.html) and updated the database manually

After some work, I got the site working again, I can upload and batch add fine, etc.
However, there are still some problems. I enabled the debug mode, and you can see there are a LOT of things still missing. Also, for instance, I can't create a new user (so I can't create a new test account), which has me thinking that there is some sort of hickup in the database still, that most things have not been converted to the 1.5.12 version.

I'm at my wits end honestly, I would have no idea where to start now to fix all the remaining errors, like the users etc.

I am providing you with a link to the gallery:
(but no test account, since that doesn't seem to work to create one or log in with an old one, I apologize)

Which would be your advice? Should I downgrade again to 1.4.27? I have done that before, and performed the upgrade again, but I still got the same problems. Should I downgrade again and not perform the upgrade all together (is is possible there is some kind of fault with my host, that the database does not change with the updates?)

Or is this fixable? Because if I keep on with the 1.5.12 ofcourse I'll want to upgrade further with new releases, but if this is already a not correct database then I think all my next upgrades will fail.

If anyone can have a look into this or share some advice, I'd appreaciate it. For now, I have left the debug enabled so you can see what's going on (because I can't seem to create a test account)
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: glycerine on March 06, 2011, 11:06:23 am
please discard the lines about not being able to create a test user
after some tries, I have been able to create one both as an admin, and as a regular guest signing up

test account
user: user1234
password: password1234

The example of "errors" I get is for example on the config page, this:


    * Notice line 5718: Undefined variable: language_array


    * Notice line 99: Undefined index: alb_desc_thumb
    * Notice line 477: Undefined index: alb_desc_thumb
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: glycerine on March 06, 2011, 05:55:20 pm
I don't know if I should make a new thread (but I don't think so, it's still in relation)

When I want to view plugins I get this error:
While executing query 'SELECT * FROM cpg_plugins ORDER BY priority ASC;' in pluginmgr.php on line 119

mySQL error: Unknown column 'priority' in 'order clause'

I had to manually add the cpg_plugins again because it was gone, but I don't have any of the structure anymore and not sure how to recreate it.. Any advice?
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: Nibbler on March 06, 2011, 09:22:07 pm
Look at sql/schema.sql for the table structure.
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: glycerine on March 06, 2011, 09:37:04 pm
Thank you Nibbler, by doing that I managed to restore the plugins. Though I don't really know much about PHP/SQL (I did the things I did by reading the topics online here, very helpful!), I was wondering if you would advise it safe to run everything in the schema? Or is there any way I can know which entries I need to enter to modify the tables throug the SQL via PHPmyadmin.  There are a lot of albums in mine, and that's the thing I'm worried about losing the most.

So I guess my questions are
a) do you think something is terribly wrong with the gallery by having to modify the database manually? I don't know why the script doesn't do it honestly, a bit lost here. Still it's up and running, and I can seem to upload/create albums/have a user upload files just fine, so can I disregard some of the debug notices or will that stall me in a further upgrade down the road?  Or would you advice to downgrade again to the 1.4.27 and use that 'till I can figure out (or my host) why the database is not able to modify itself through the upgrades?
b) If I run the commands (I take it), in the schema.sql through the database, will I lose things already in there, such as album structure, user groups?

I'm terribly sorry for being a burden, but I really like the 1.512 version and I'd love to keep using it! Ofcourse, only when it's safe for me to continue, and I have no idea!
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: Nibbler on March 06, 2011, 11:11:05 pm
Check that the database user Coppermine is using has the CREATE and ALTER mysql permissions set. If not, it won't be able to update the table structure or create new tables when you run update.php. Debug mode notices and warnings can be safely ignored; they are shown for the benefit of developers not end users.
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: glycerine on March 07, 2011, 07:08:44 am
Hi Nibbler,
thanks so much. The user has indeed all the permissions set (including Creating and altering)

I keep getting debug/error messages (like when I create a new album, I see this: albmgr.php
Notice line 60: Undefined variable: groups, and that last line like 50 times), but I don't know if it's of any importance to me. I should probably just turn off the debug mode and work with the errors I get (for instance, plugins)

I'll also try to copy the structure in a seperate forum, and do an upgrade with a different user, see where that takes me. But it's very odd, it is indeed like the database just refuses to update (while the right permissions are set)

Anyways, should you deem it ok to turn off debug, that's what i'll do! Thanks!
Title: Re: Fatal error 1.4.27 to 1.5.12
Post by: glycerine on March 11, 2011, 10:27:33 pm
Sorry for once again answering my own question, but I finally did a good install, and I wanted to share it (it's not really the easy way, but it worked!)

What I did was,
1) I made a new directory all together (so if my coppermine is photos, I uploaded the 1.5.12 files in "pics")
2) I created the albums directory (but no files in it!) and made that writeable, and made the whole include writable
3) i uploaded the last backup of the 1.4.27 in yet a new gallery database and pointed the config to that file. I used another database user for this part, made sure it had all the permissions, but I went BACK and checked it again, and again checked all permissions (as everything was checked except that, not sure if that did anything or not, but oh well)
4) this is a side step, but I had to manually enable the plugins through PHP my admin because my latest backup I hadn't performed that step yet
5) ran the update.php and it worked like a charm! (apart from the pictures now showing up ofcourse)
6) used this config in my "real" gallery, so that it has a correct database

so basically the things I did "different" (though I did them before too, honestly!) were I used a new user in a new database (again checked all the permissions), enabled plugins manually through php my admin (because last time I did it through the config the first time, the second time i deleted the folder, that's a mistake on my part), and I made sure that the whole include folder was writable (instead of just the config file)

so anyways, if people are having problems like mine, maybe you can also benefit from the last steps I did? I know it's a bit long, because I keep backing up databases lol, but I rather have five stored databases then one that isn't functioning anymore!

The only question I have for the coppermine team now is: do I leave the includes file on fully writable 777? I read that it's like that in the install, but I forgot what happened after.. So sorry for the dumb question, but I'm so pleased! And loving the new coppermine :)