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: Unable to connect to database !  (Read 766 times)

0 Members and 1 Guest are viewing this topic.

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Unable to connect to database !
« on: December 19, 2020, 08:30:53 pm »

Coppermine critical error:
Unable to connect to database !

MySQLi said: :

----


I was backing up and copying files over to a new install and got this message.

Here is my website: https://cxhnow.com/cpg/

Can't access admin panel or anything.

Any advice?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4808
    • Windsurf.me
Re: Unable to connect to database !
« Reply #1 on: December 19, 2020, 08:33:44 pm »

That means the details in your include/config.inc.php file are incorrect. You will need to edit that to refect the correct database connection details
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #2 on: December 19, 2020, 08:55:14 pm »

Thanks for replying  :)

I was able to change the information in that file, and now I have received this Fatal Error:

While executing query 'SELECT name, value FROM cpgtr_config' in include/init.inc.php on line 176

database error: 1146 : Table 'cxhnowsu_cpg20.cpgtr_config' doesn't exist
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4808
    • Windsurf.me
Re: Unable to connect to database !
« Reply #3 on: December 19, 2020, 09:54:35 pm »

Have you copied over the database and then run update.php
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #4 on: December 19, 2020, 10:16:12 pm »

Unfortunately I am not well-versed with this kind of stuff. PHP is something I am brand new to, so I have no idea how to do the things you mentioned. Since I am below a beginner, should I just leave well enough alone?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4808
    • Windsurf.me
Re: Unable to connect to database !
« Reply #5 on: December 19, 2020, 10:25:52 pm »

It is not complicated. There is no coding to do.

Just to get things straight, you were moving your gallery to a different host?

What steps have you done so far?

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

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #6 on: December 20, 2020, 02:14:39 am »

Not to a different host no, but instead to a new install (same host).

So far I copied and pasted the content from the /gallery Cpg install over to /cpg. Everything seemed to be in working order so I deleted /gallery as intended and broke something along the way.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1690
Re: Unable to connect to database !
« Reply #7 on: December 20, 2020, 02:22:12 pm »

If you place the file manager from here in the root of your site, I will see if I can straighten things out for you.
Logged

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #8 on: December 20, 2020, 05:29:23 pm »

I was able to install it into public_html!
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1690
Re: Unable to connect to database !
« Reply #9 on: December 20, 2020, 10:10:48 pm »

There were no tables in that database prefixed with cpgtr_. There were CPG tables prefixed with cpgg5_. I changed the prefix in the settings for /cpg/ and it doesn't fail now but, as you can see, those tables are for an empty CPG install. You may need to PM me your admin credentials for databases so I can see them all.
Logged

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #10 on: December 20, 2020, 10:14:38 pm »

Okay I will do so now. Thank you so much for helping me!
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1690
Re: Unable to connect to database !
« Reply #11 on: December 21, 2020, 12:32:46 am »

It would seem that you used Softaculous to start your original CPG installation. When you used Softaculous to delete that installation, it also deleted the database for your Coppermine Gallery. Unless there is a database backup somewhere, everything that defines your albums and where the pictures in them are located ... is gone.
Logged

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #12 on: December 21, 2020, 05:25:43 am »

Thanks for checking. I think I found a backup through CPanel. Do I just unzip it and upload the contents to public_html/cpg ?
Logged

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Unable to connect to database !
« Reply #13 on: December 21, 2020, 05:26:42 am »

Thanks for checking. I think I found a backup through CPanel. Do I just unzip it and upload the contents to public_html/cpg ?

I forgot to add that it's an SQL Source File.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1690
Re: Unable to connect to database !
« Reply #14 on: December 21, 2020, 01:31:40 pm »

I looked via your cPanel and didn't find a backup. I'll look again. But you can upload that file (zipped) to /cpg so I can see whether it will be correct.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1690
Re: Unable to connect to database !
« Reply #15 on: December 21, 2020, 02:28:54 pm »

I looked via your cPanel and didn't find a backup. I'll look again.
The only offering from your cPanel is to download a 'backup' of the current database(s). I'm afraid your original CPG database is gone.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.