Restoring my Gallery Restoring my Gallery
 

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

Restoring my Gallery

Started by Meghan3, March 18, 2021, 08:45:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Meghan3

I recently switch servers for my sites and I'm trying to restore my gallery. I had done it once before but seems there is something I am missing. I downloaded all my files and the SQL from the PHPAdmin from the old server. Now after I have reuploaded my files and the SQL to the new server it's giving me this

QuoteCoppermine critical error:
Unable to connect to database !

MySQLi said: :

I clearly can see I have done something wrong, but I am not sure what it is. I am looking for some help to figure out what I have done wrong and how to restore my gallery. The last thing I want to do redo the albums and reupload all the files.

phill104

What that usually suggests is you need to edit your include/include.inc.php file to reflect your new database connection details. Once done, you also need to run /update.php
It is a mistake to think you can solve any major problems just with potatoes.

Meghan3

Do you mean the config.inc.php file? I did change that to the database on the new server, but when I run the update.php it didn't do anything.

phill104

Oops, my bad. Yes I did mean config.inc.php

What version PHP is your new server running. Is it running MySQL or mysqli

It is a mistake to think you can solve any major problems just with potatoes.

Meghan3

It looks like it might be running mysqli. The PHP version is 7.3.

phill104

Then you will need to upgrade to 1.6.x and that version of PHP is not supported by CPG1.5.x

https://forum.coppermine-gallery.net/index.php/topic,79013.0.html
It is a mistake to think you can solve any major problems just with potatoes.

Meghan3

The gallery was upgraded before I downloaded the SQL for the transfer. I have tried this with files from CPG1.6x and it's still giving me the error. I even tried at one point deleting the config file and installing it as if it was all new. It let me install the gallery. I just tried doing what was said in the thread you sent me and I'm still getting the same error.

What I am trying to do is just restore all the albums and files that were within my old gallery. I know that involves downloading the SQL and I did that. I added all the files back into the gallery and didn't install a new gallery. I did that on another site and it didn't work either. This one I uploaded everything as is and then through the phpadmin uploaded the SQL from my other gallery. That is when I go that error. Then I tried all the things I listed above and nothing.

All I want to do is retore all the albums and files that I had in the gallery without having to go through and do it manually. It seems I have done something wrong.


ron4mac

You can't use the include/config.inc.php file from your old server on the new one without changing the values to coincide with with the database to which you imported the SQL data.

// Coppermine configuration file
// Database configuration
$CONFIG['dbtype'] =   'mysqli';        // Your database type
$CONFIG['dbserver'] = 'localhost';     // Your database server
$CONFIG['dbuser'] =   'old-dbuser';    // Your database username   <-- these must match
$CONFIG['dbpass'] =   'old-password';  // Your database password.  <-- the values/names
$CONFIG['dbname'] =   'old-dbname';    // Your database name       <-- set on the new host

// DATABASE TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] = 'cpg16x_';

Meghan3

Quote from: ron4mac on March 19, 2021, 07:27:30 PM
You can't use the include/config.inc.php file from your old server on the new one without changing the values to coincide with with the database to which you imported the SQL data.

// Coppermine configuration file
// Database configuration
$CONFIG['dbtype'] =   'mysqli';        // Your database type
$CONFIG['dbserver'] = 'localhost';     // Your database server
$CONFIG['dbuser'] =   'old-dbuser';    // Your database username   <-- these must match
$CONFIG['dbpass'] =   'old-password';  // Your database password.  <-- the values/names
$CONFIG['dbname'] =   'old-dbname';    // Your database name       <-- set on the new host

// DATABASE TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] = 'cpg16x_';


To make sure I am understanding what you are saying. The user name and password for the database should be the same, but the database can be new, or should it be the old one?

I have tried with the old database information and new database information and both give me the error.

ron4mac

If you can PM me with credentials for your site, I will help you clear up the issue(s).

Meghan3

Quote from: ron4mac on March 19, 2021, 11:37:33 PM
If you can PM me with credentials for your site, I will help you clear up the issue(s).

Just sent you a pm with the information.

ron4mac

I've been there a hundred times. There were typos in your config.inc.php that you just weren't seeing.

Meghan3

Now that the gallery has been restored it's causing server issues and won't let me change the theme at all. Should it be doing that?

ron4mac

Your theme is set to 'zdc copp 10' but that theme folder is empty. That will cause CPG to revert to Curve.

I also set your gallery URL in the config to https://... instead of http://... to match how it is being run.

Meghan3

I tried to see if I deleted the old files from zdc copp 3 and put in the files for the new theme ( zdc copp 10 ) I wanted to see if that would work. it didn't. Even when I had the correct files in there it wouldn't let me change the theme. Didn't matter which theme I picked it would stay with the one that it's currently using which is the zdc copp 3.


Meghan3

Not sure what I did, but I finally got the theme to change. Not going to touch it now.