About a week ago my website was hacked all my files deleted. The CPG database was restored, as were the images in the albums directory. Everything else I don't have, however.
I decided to upload the CPG 1.5 files and perform the upgrade (my previous CPG version was 4.2.6 I think). Anyway, I get this error when attempting to access the upgrade page:
QuoteCoppermine critical error:
Unable to connect to database !
MySQL said: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
However, I've checked the database connection information and everything is correct. What should I do?
My gallery URL is http://www.metcoverart.com/gallery/
Thanks for any help
Speak to your host as it is almost certainly a hosting problem. Googling '/var/run/mysqld/mysqld.sock' brings up loads of answers as to what may have happened.
I asked my host about it and the support tech restarted MySQL, tested logging into phpMyAdmin, and accessing MySQL from the web server. All worked fine. He suggested extra spaces in the config.inc.php file may be causing problems, so I deleted extra spaces and reuploaded the config file. Now I get a different error:
QuoteCoppermine critical error:
The group table does not contain the Anonymous group !
^ That's when accessing the CPG 1.5 upgrade script. If I try to access any other pages I get a "Fatal Error" with a blank message.
By the way, there is no Anonymous user group because my gallery was bridged with my IPB forum, so it uses the forum member groups.
You can manually add that group by performing that query in phpMyAdmin:
INSERT INTO CPG_usergroups VALUES (3, 'Anonymous', 0, 0, 1, 0, 0, 0, 0, 1, 1, 3);
Don't forget to adjust the table prefix 'CPG_'.
Thank you for your help :)
I ran the query and added the group, and I then checked the rows to make sure it was there. But, when I ran update.php I got the same error, and after checking the database the Anonymous user group was no longer there. I tried adding it again and running update.php again but got the same problem, like it's deleting that group.
You can't run update.php without being logged in.
which is what I assume your doing since I get the same error when I view it.
Quote
Coppermine critical error:
The group table does not contain the Anonymous group !
Go to your phpMyAdmin and enable debug mode and fix the Fatal Error before trying to get update.php to work.
http://documentation.coppermine-gallery.net/en/errors.htm#errors_debug_mode_manual
Since cpg1.5.x you cannot run update.php without administration privileges. I assume you haven't replaced all files properly.