Help neeeded rescuing an old Gallery install from a Cpanel install

68 views
Skip to first unread message

Andrew L

unread,
Dec 28, 2020, 6:01:16 AM12/28/20
to Gallery 3 Users
I would appreciate some advice on how to recover a Gallery installation that is currently on a CPanel webhost. Ideally recover to a working Gallery but failing that recover the albums and the photo captions.

It stopped working at some point possible due to a PHP update. I left it because there are a lot of photos but was resigned to losing functionality because Gallery stopped being supported.

It is in a folder called gallery2 but CPanel/Softaculous may have attempted to upgrade to Gallery3. The README says it is 2.3.1.

I have not been able to log in for some time.

Most of the files are dated around 2012 but the error_log was last modified Oct 2016.

Even if I could get to the login screen I don't know if I could remember the password.

It does not need to run on another CPanel. I am happy to host locally on a PC just for personal viewing, or potentially extracting the albums and posting to a newer, possibly commercially supported platform.

I am reasonably comfortable downloading the directories and MySQL databases. But I'm not sure where to start.

So any advice gratefully accepted.






JR

unread,
Dec 29, 2020, 6:02:19 AM12/29/20
to gallery...@googlegroups.com

Andrew,

You're in a challenging situation. There are some members of this group who were using Gallery 2.3.2 up until recently and I hope some of them will chime in with some suggestions or instruction -- but if you don't know your admin log-in name and password, that makes actually getting it back up and running problematic. Besides, there's probably not much point because Gallery 2 will no longer run on most hosting server accounts because of the move to PHP 7.

First, let's clarify what happened when you went into Cpanel, clicked on Softaculous and installed Gallery 2.3.1 from there. What Softaculous did was create a standard Gallery 2 installation into a folder on your server account, exactly the same as if you had uploaded the Gallery 2 setup files and installed Gallery yourself. Gallery is not actually "running on Cpanel" -- it is running from its own folder in your Godaddy web-hosting account. Cpanel is just a collection of tools for working on your hosting account.

Softaculous will not automatically update a program it has installed -- you have to tell it to do an update. So, unless you told it too, you are still running Gallery 2.3.1 -- which is the next-to-the-last version of Gallery 2. The final version was 2.3.2, released in 2012.

If you accepted the default options when you had Softaculous install Gallery, then there's a folder in your Godaddy hosting account called " gallery " which should be where all of your gallery files and images live. There will be quite a few sub folders under the main " gallery " folder. It sounds like you already know how to use the Cpanel tool  "File Manager" to poke around in there and see if you can find the sub-folder where your images are stored -- just be careful and don't delete or change anything in the gallery installation. Doing that would make an already bad situation worse.

As for where your images are "hiding" -- It's important to know that the Gallery 2 database itself does *not* store your images inside it -- it only stores text and number data... things like names, descriptions, user comments, number of views and other "metadata" -- plus it stores a text reference to where each one of your actual images are stored. You can backup your database and browse through it so see those comments and things, but making a database backup will not get you your images.

So where are they? Unless something was changed during installation, your images should be located in the " gallery " main folder in a sub-folder named " gallery/g2data/ " probably in another sub-folder called " gallery/g2data/Albums/ " and various sub-album folders below that. They are not in any special format, they are sitting there in the same format they were in when you originally uploaded them into Gallery 2. They can be copied out of those locations into other locations on your account (or downloaded to your computer).

My thought is that you would be better off just copying all of the your images out of your  gallery/g2data/Albums/  folder(s) and putting them into a new folder on your hosting account outside of "gallery" -- call it something simple like "oldimages". Once you have your old images in a new folder you can then either work with them in your hosting account or download them to your computer -- or install some other gallery type program using Softaculous and upload your old images into it. The Piwigo app is a very popular choice and it's available for installation using Softaculous.

You probably know that your hosting account (and Gallery) use the PHP scripting language to make things work. The current version of PHP is 7.

And that's the big problem: Gallery 2 will simply *not* run on anything higher than PHP 5.6 -- so there's not really much point in trying to bring your old Gallery 2 installation back to life because one of these days (soon) Godaddy is going to tell you they won't support any version of PHP 5 anymore -- if they haven't already done so. If Godaddy has already set your hosting account to PHP 7 then Gallery 2 will never run on it again no matter what you do. But if you really like Gallery and want to continue to use it, that's where we come in: You can do a manual install on your Godaddy hosting server of the latest version of Gallery 3 (version 3.l.3) and put your images into it. Gallery 3.1.3 runs fine on PHP 7.  Gallery 3.1.3 is not currently available for installation by Softaculous, but doing it manually is a simple process.

So I suggest:

1) Find out which version of PHP your Godaddy hosting account is running. This information can often be found listed in the Cpanel "main page" but the easiest thing may be to call Godaddy Tech support and ask them to tell you. The best thing about Godaddy is that they do have real live tech experts you can get hold of on the phone. You have to wait 15 minutes or more on  hold, but you can get through to them and get answers about things like this.

2) Confirm where your images are located so you can get them out from under the " gallery " folder umbrella.

-- J.R.

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/ed2d8319-4763-426b-8b36-eb7042df94d0n%40googlegroups.com.

Andrew L

unread,
Dec 29, 2020, 7:47:18 AM12/29/20
to Gallery 3 Users
Thanks for your thoughts.

Just to clarify...my Gallery was not running on GoDaddy. I think someone else was posting about GoDaddy. Mine is on another CPanel based host.

The PHP version is currently 7.4. I can choose PHP versions all the way back to 4.4 so maybe I could set to 5.5 or 5.6 and try?

I misread the Softaculous updates page. I believe it is offering/recommending an update to 3.0.2, but I imagine that would be a dangerous thing to do. I have not updated it.

I can probably find or guess the admin password if I could get to the login screen. Currently I get a 500 server error with PHP 7.4, which ties in with what you say.

But I would imagine I could clear or set a new password in the database like I have done with WordPress in the past?

I have located the albums and the photos are there.

To further clarify, I don't need Gallery 2 or Gallery 3 running out on the web. I am happy to have running on a home server or, if that proves too much work, the most important thing is to reunite the captions/titles with the images (because a lot of work was put in to the captions by someone else).

If there is a way to export the metadata and find a link between each jpg and its caption I'd be happy to write a Python script to rename each image with its caption, or write the text into the EXIF of the jpg.

However, I'd be very comfortable installing 3.1.3 manually so if there is a way of importing the existing album files structure and metadata I'm happy to have a go.

Cheers.

Damien Andrews

unread,
Dec 29, 2020, 9:11:16 AM12/29/20
to Gallery 3 Users
Hello Andrew,

I recently moved my functioning two language Gallery 2.3.2 to a new hosting company. I have kept that original version running with the new hosting company, and created a 3.1.3 version, as well as a Piwigo version. At this point I'm still not entirely sure what I'm going to end up doing.

As you can adjust the PHP version, the first thing I would do is drop the PHP version back to 5.2 (and incrementally upwards from there) and see if it comes to life. It it does, then try this to recover your password:
Go to:
http://www.yourdomain.dd/gallery/lib/support/ (i.e., add /lib/support/ to the URL for your gallery.)

Then in the config.php file on the server look for: $gallery->setConfig('setup.password', 'your password here');

Use the password contained there and you should be good to go. 

You could keep it as is, if your hosting company will let you keep that version of PHP indefinitely, or move it to your own server, which I guess would not be too hard... You could also test out version 3 on the current server (which will not affect version 2 as 3 can be installed in its own directory with a separate copy of the data). You could also try out Piwigo...

Keep us up to speed on your situation!

Damien

Andrew L

unread,
Dec 29, 2020, 4:15:27 PM12/29/20
to Gallery 3 Users
Hello Damian,

Thanks. I set PHP to 5.2 and it works - mostly - one or two missing images, but the full size ones are there. I have a couple of WordPress sites on the same account so I cannot really leave the PHP down at version 5.2 for long.

Also had a couple of guesses and managed to get in as administrator, so good progress.

I could install Gallery 3, as you suggest. I can copy the image files across, but how do I get the new install to see all the metadata? It's the captions I need.

I've also tried Piwigo on another CPanel-based host I have. It's nice, and actively supported. Is there a migration path?

Damien Andrews

unread,
Dec 29, 2020, 10:14:33 PM12/29/20
to Gallery 3 Users
Hello Andrew,

Glad that your Gallery is now functional and that you could log in...

If your hosting company allows subdomains, you could place the gallery in a subdomain (eg., gallery.mydomain.com), and use a .htaccess file to set the PHP for the subdomain to 5.2. Your other Wordpress sites will not be affected. Your hosting company will be able to assist you. One problem with moving to a subdomain is if other sites have linked to images or pages in your gallery their links will no longer work...

If you install Gallery 3, the captions should appear as I believe they are contained in the database. I could not get the view counts to appear or get my second language to show up, so I decided to try Piwigo, which has multi-language support. Due to space limitations on my server, I could not play around with three separate galleries at the same time (Gallery version 2, version 3 and Piwigo) so I deleted G3... I've been quite busy till now so I haven't made much progress with Piwigo. It does have a Gallery import function. Search on the website and you will find instructions. I have to say I do prefer how things work with Gallery 2/3. 

I hope to get my Galley 2 functional as the view counts are a kind of historical record... (currently all the thumbnails are broken as I can't get the graphic toolkits to work). I plan to see if I can get my Piwigo installation to somewhat "resemble" the original gallery and move forward with that.

I've noticed since I joined this group that development of various aspects of Gallery 3 seems to be continuing (i.e., responsive templates...), so Gallery may remain viable for quite a while yet!

Damien

Andrew L

unread,
Dec 30, 2020, 11:46:53 AM12/30/20
to Gallery 3 Users
Thanks again. Interesting thought on .htaccess but I think I should avoid using PHP 5.2 and Gallery 2 ;-)

I am inclined to try importing to Piwigo on the same server. As far as I can see, I copy the directory structure across, install the Menalto2Piwigo plug-in and then give it the database access details to copy captions across. Is that the way you did it?

If I can get a working copy across to Piwigo (for safety) I may then try an upgrade to Gallery 3.

Andrew
Reply all
Reply to author
Forward
0 new messages