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: Restoring my Gallery  (Read 972 times)

0 Members and 1 Guest are viewing this topic.

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Restoring my Gallery
« on: March 18, 2021, 08:45:49 pm »

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

Quote
Coppermine 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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4799
    • Windsurf.me
Re: Restoring my Gallery
« Reply #1 on: March 18, 2021, 08:58:16 pm »

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
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #2 on: March 18, 2021, 09:12:00 pm »

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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4799
    • Windsurf.me
Re: Restoring my Gallery
« Reply #3 on: March 18, 2021, 10:42:24 pm »

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

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

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

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #4 on: March 18, 2021, 11:01:17 pm »

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

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4799
    • Windsurf.me
Re: Restoring my Gallery
« Reply #5 on: March 19, 2021, 03:01:17 pm »

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
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #6 on: March 19, 2021, 03:35:41 pm »

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.

Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1667
Re: Restoring my Gallery
« Reply #7 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.

Code: [Select]
// 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_';
Logged

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #8 on: March 19, 2021, 07:42:55 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.

Code: [Select]
// 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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1667
Re: Restoring my Gallery
« Reply #9 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).
Logged

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #10 on: March 19, 2021, 11:50:57 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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1667
Re: Restoring my Gallery
« Reply #11 on: March 20, 2021, 12:40:44 am »

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

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #12 on: March 22, 2021, 02:43:39 pm »

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?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1667
Re: Restoring my Gallery
« Reply #13 on: March 22, 2021, 05:58:35 pm »

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.
Logged

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #14 on: March 22, 2021, 06:24:14 pm »

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.

Logged

Meghan3

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Restoring my Gallery
« Reply #15 on: March 22, 2021, 06:43:14 pm »

Not sure what I did, but I finally got the theme to change. Not going to touch it now.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.