Advanced search  

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]

Pages: [1]   Go Down

Author Topic: think i got the upgrade wrong rc3 to rc4  (Read 7731 times)

0 Members and 1 Guest are viewing this topic.

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« on: November 28, 2003, 06:17:15 pm »

ok, i copied all the files across, over the exisitng ones

ran the upgrade script

all fine.

the i realised i hadn't changed my database prefix in the sql files

amended them, ran the upgrade/install

get this message "The install/upgrade has already been run successfuly for "coppermine" and is now locked." - how do i unlock coppermine

i also get this error when i try to view the gallery:

Fatal error :
There was an error while processing a database query

the url is http://www.smcc.org.uk/modules.php?name=coppermine

I know I probably messed it up myself, but not being too hot on mysql and php I am in need of some assistance.

Any takers?
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
think i got the upgrade wrong rc3 to rc4
« Reply #1 on: November 28, 2003, 08:56:06 pm »

you don't change the prefix in the sql files the installer takes care of that part.

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #2 on: November 29, 2003, 09:48:17 am »

oh. but when i did it the first time it created a table without my prefix on it. the upgrade script has this in it:

CREATE TABLE cpg_exif etc etc

and all the update table and insert sql  scripts don't use the prefix..... is cpgupgrade.sql used? that might be where i'm getting confused.

anyway, how can i sort the problem i now have out? re-run the sql with out the prefixes? I do need to get this sorted as it's the main feature of the web site  :D
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
think i got the upgrade wrong rc3 to rc4
« Reply #3 on: November 29, 2003, 10:41:03 am »

the sql tables are only for when the install fails the install takes the input from the user and the sql calls are written directly from in there...
You shouldn't need to run the upgrade script to go from RC3 to RC4 all your tables should have been installed in RC3. Please check that all 9 tables exist: (cpg_ is standard install)
cpg_albums
cpg_categories
cpg_comments
cpg_config
cpg_exif
cpg_installs
cpg_pictures
cpg_usergroups
cpg_votes

Do you have any blocks enabled? any  RC3 blocks won't work and may cause an error like you have.

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #4 on: November 29, 2003, 11:03:51 am »

i have cpg_users too

should that be there?
I had no active blocks running, and just got rid of the inactive ones that were using the old blocks.

still got the same problem. would this user table be causing problems?
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
think i got the upgrade wrong rc3 to rc4
« Reply #5 on: November 29, 2003, 11:39:57 am »

cpg_users shouldn't be a problem it was never used in the port and is a legacy of the standalone from 11d it should be safe to delete. $prefix(nuke)_users it what is used with the phpnuke port.
Also include/config.inc.php is not used anymore. (don't delete config.php not the same)
Check the value of theme in cpg_config should be default, make sure you uploaded all files from RC4 default theme folder, delete other themes from your online theme folder(you can keep the local ones if you want)

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
think i got the upgrade wrong rc3 to rc4
« Reply #6 on: November 29, 2003, 11:41:41 am »

also turn on debug mode and logon as nuke admin if your not already

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #7 on: November 29, 2003, 12:04:58 pm »

i can't get to the admin screen to set debug mode on. it's set to 1 in the database.

i have just deleted all coppermine module files (except the albums) and reuploaded them from the rc4 zip file i just downloaded again.

Still no joy.

I think i've probably messed up something in the database, but I don't know what.

The only thing I can think of that would cause a database problem is:

maybe the prefix i use is causing a problem.
the correct prefix is set in the database. I use smccnuke_ so should it be set to smccnuke_cpg or just smccnuke_ in the database. if i need the smccnuke_cpg it won't fit because it's only a 10 character field.

Other than that i'm a bit stumped..... and it's raining....... and i've still got to do my christmas shopping...... today is not a good day  :(
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
think i got the upgrade wrong rc3 to rc4
« Reply #8 on: November 29, 2003, 12:33:52 pm »

Is smccnuke_ your nuke prefix? or just coppermine ? Shouldn't be the prob either way... if you are not using the cpg_ prefix for another install(standalone) you mi's well just use that for coppermine. If you have no importent info in the coppermine table delete all, run install.php.
Or rebuild from coppermine.sql  use phpmyadmin to run queries.
Well it's raining here too and after 1am, I go to sleep

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #9 on: November 29, 2003, 12:47:11 pm »

thanks for your help, have a good sleep

I'll give a few more things a try and see what I can break or fix (break is more likely) so there might be a load of questions for when you get up.

Cheers
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
think i got the upgrade wrong rc3 to rc4
« Reply #10 on: November 29, 2003, 01:46:43 pm »

In my sticky post about RC3 bugs....
Quote from: "DJMaze"
Just overwrite all files and all works !

I never mentioned to use the install.php or .sql files for upgrading from RC3 to RC4.
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #11 on: November 29, 2003, 06:08:37 pm »

that's very true.

I know it's probably me who's made a balls up of it, so now I'm just trying to work out how to fix it.

is the only way to dump the tables and then run the install.php?
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
think i got the upgrade wrong rc3 to rc4
« Reply #12 on: November 29, 2003, 06:58:00 pm »

dump cpg_installs table and you should run install.php again.

it will show a lot or red dots due to failures but everything should work after that.
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #13 on: November 30, 2003, 07:35:17 pm »

just dropped the cpg_installs table.

it's giving me this response when i run install.php

The installer is locked
ERROR
The install/upgrade has already been run successfuly for "coppermine" and is now locked.

is there a file or something that i need to make writable? or a field in the database to change?
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
think i got the upgrade wrong rc3 to rc4
« Reply #14 on: November 30, 2003, 08:11:25 pm »

did you delete the right cpg_installs table from the right database ?

the "lock" only occures when cpg_installs exists and it has already a entry for your Coppermine RC4 module
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #15 on: December 01, 2003, 01:51:17 pm »

I managed to run the install.php after dropping a cpg_installs table. In the list that says what is going on, I noticed the following:

CREATE TABLE `cpg_installs` (`cpg_id` TINYINT (3) NOT NULL AUTO_INCREMENT, `dirname` VARCHAR (20) NOT NULL, `prefix` VARCHAR (10) NOT NULL, PRIMARY KEY(`cpg_id`))        

INSERT INTO `cpg_installs` VALUES(NULL, 'coppermine', 'smccnuke_cpg_')

So, could this be the problem?

when the install script runs it creates a table called cpg_installs WITHOUT the correct prefix, even though I specified the prefix to use.

So would there be some confusion between the scripts, where it would be looking for a cpg_installs with my prefix eg smccnuke_cpg_installs when i try to view the gallery?

I still get the:
Fatal error :
There was an error while processing a database query

message when i try to view the gallery.

I tried just renaming the cpg_installs table and adding my prefix, but then I got the message saying something like coppermine has not been installed, run /modules/coppermine/install.php

So is this a bug? Or is it still me messing things up?
Logged

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #16 on: December 02, 2003, 11:51:01 am »

ok, after a bit of digging I have come up with this as being the problem.

first of all, my prefix was wrong in the cpg_installs table....  probably my mistake.

but, that's not the problem. After tweaking the error message that i get i think i've tracked the problem down to this query:

SELECT * FROM smccnuke_users, smccnuke_usergroups WHERE user_group_cp = group_id AND user_id=' ### an id ###' AND user_active_cp = 'YES' AND user_password = ' ### a password ###'

I DON'T have an smccnuke_usergroups table!!!  

edit: I have a smccnuke_cpg_usergroups table though. So it's not quite working somewhere. Any idea where that query is run?
Logged

gazraa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
think i got the upgrade wrong rc3 to rc4
« Reply #17 on: December 02, 2003, 12:01:07 pm »

ok, found the problem

in cpg_installs the field is not long enough to take my table prefix

my prefix would be smccnuke_cpg

the field is only 10 characters long, so it fails.

I increased the field length to 15 and it all works again.

Phew!!!!!!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.