forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: rad259 on May 01, 2011, 08:06:18 am

Title: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: rad259 on May 01, 2011, 08:06:18 am
I did an upgrade from 1.4 to 1.5.12 using update.php script successfully. All new tables cpg15x_xxx were created.  However, I observe that although it runs update.php, soon it turns to install.php script.  There is no step to migrate data from cpg14x_xxx tables to cpg15x_xxx tables. Due to that, when I logon to my gallery, it is empty.

My question: is update.php script incomplete? Or, I need to manually run another script? In the upgrade doc, only update.php is the script I need to run.

My gallery is www.yu-photo.com.

Thanks!
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: phill104 on May 01, 2011, 11:59:56 am
sounds like you did not perform an upgrade but instead installed a fresh copy. Please restore from your backup and try again following the instructions carefully.
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: rad259 on May 01, 2011, 03:37:44 pm
Hello Phil,

Before I run update.php script, I did the following:
1. keep album folder and anycontent.php, and delete all other files and folders
2. copy entire new 1.5.12 files and folders over
3. run update.php

Is anything wrong?

Why update.php script changes to install.php during its execution?

Thanks,
George
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: rad259 on May 01, 2011, 03:52:47 pm
In the upgrade doc, it asks me to backup two files: include/config.inc.php file and anycontent.php file.  However, it does not ask me to copy the old include/config.inc.php back to include folder after copying all CPG 1.5.12 files over. Could this be the cause of the problem?

I think the update.php script cannot recognize I have an old version running, and it needs ab upgrade instead of a new installation. What is the indicator of an older existing Coppermine Gallery?

Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: Joe Carver on May 01, 2011, 04:49:41 pm
..... copy the old include/config.inc.php back to include folder after copying all CPG 1.5.12 files over. Could this be the cause of the problem?

Yes, copy your backup of /include/config.inc.php into the /include/ folder of your updated Coppermine.
Then run update.php.
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: rad259 on May 02, 2011, 01:48:58 am
After I copy the /include/config.inc.php into the /include/ folder of my updated Coppermine, re-run the update.php, first I got

CPG seems not to be installed correctly, or you are running the coppermine for the first time. You'll be redirected to the installer. If your browser does not support redirect, click here.

Then it turns to install.php.  At the first step, a new error appears:

The installer is locked
ERROR
The installer has already been successfully run once and is now locked.
If you want to run the installer again, you first need to delete the 'include/config.inc.php' file that was created in the directory where you put Coppermine. You can do this with any FTP program 


It appears to me update.php is looking for a file with 1.4 installation info, but failed to detect that. What is that magic file? I have album folder, include/config.inc.php and anycontent.php files copied back to the new 1.5.12 Coppermine folder.
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: rad259 on May 02, 2011, 02:15:31 am
Just wondering if I did too much:

Before uploading 1.5.12 files and folders, I deleted everything except the albums folder and anycontent.php file. Then, I uploaded all 1.5.12 files and folders except the albums folder and anycontent.php.  Afterwards, I upload the  /include/config.inc.php into the /include/ folder of my updated Coppermine. 

In the upgrade doc, it only instructs to copy 1.5.12 files over, in other words, on top of existing 1.4 files/folders.  Could this make a difference? Some 1.4 files are needed for upgrading?
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: lurkalot on May 02, 2011, 09:39:16 am
Correct.  When you deleted everything except the (albums file, and anycontent file), you also deleted the include/config.inc.php file which is needed to hook your gallery up to the existing database.

The procedure outlined in the docs asks you to overwrite the existing files,

"Except for the "albums" directory, upload all of the new files and directories, making sure not to overwrite your anycontent.php file or the albums directory."
 
Because it was telling you to overwrite, there was no need to tell you not to overwrite the "include/config.inc.php file"  as the package you uploaded doesn't contain it.  It does however tell you to back up the " include/config.inc.php file" which should have been a clue not to delete it.

Doing it your way, at least you have no old files left over to mess things up.  As long as you have backups of the albums file,  include/config.inc.php file, and anycontent.php file, you should be fine.  ;)
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: rad259 on May 02, 2011, 04:28:27 pm
Upgrade went through successfully!

Yes, overwrite existing 1.4 files/folders with 1.5.12 files and folders is the key. The upgrade went smoothly in a few minutes.

Thanks again for all the help!
Title: Re: Empty DB tables after upgrading from 1.4 to 1.5.12
Post by: Αndré on May 03, 2011, 12:10:39 pm
tag your answer as "solved" by clicking on the little image in your initial posting on your thread.
Thanks.