Migrating coppermine gallery to another server Migrating coppermine gallery to another server
 

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

Migrating coppermine gallery to another server

Started by ohara, December 07, 2012, 08:30:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ohara

Hello, I am currently in the process of migrating my gallery from my USA webserver to an EU based one. I have near identical setups at both ends (CentOS 6, latest versions of WHM/Cpanel etc). I have a number of sites that I have moved across by simply creating a full backup in cpanel and restoring it on the new server (it does SQL databases...everything). It has been a seamless transition as they are mostly basic sites.

However, my main site contains a coppermine gallery and approximately 1.5 million images totalling around 65 gigabytes. The SQL database is 3.5 gigabytes alone. I knew that this transfer would be a little more difficult but I was hoping that if I got it over and had everything set up the same way it would just work.

Long story short I got the site up and running on the new server. The home page works perfectly. However, my coppermine gallery not so much. For a start, the theme is COMPLETELY broken. I can log in by going directly to login.php and putting my details in, and it lets me in. I tried running update.php and it completed the tasks but it was still broken. My albums and stuff are all there, so the SQL database is obviously working fine. I managed to get into the admin panel by going directly to admin.php and I changed the gallery path in the config to the temporary new location to see if it would fix the paths for the template, but it didn't. I tried changing theme from my custom one to the default "classic" but it made no difference. If I view the source of the gallery index page, I can see it is trying to load the images from the old site (using absolute paths rather than relative). However, this strangely isn't working either despite the gallery still being live at the old location and working perfectly fine.

I tried checking the theme to see whether it was coded to use absolute paths to the images (as I did not write it, a friend did a long time ago) but I cannot find ANY reference whatsoever to the absolute path. I did a deep file search for "/theme/smiles" (my theme is called smiles) and it only found one result, and that was in template.html from an old theme which I haven't used for AGES.

So I am absolutely stumped. I am tempted to change the nameserver settings so that the url goes to the new site location, as it is essentially a mirror image of the old site at the moment, but I don't want to risk it still not working as my site receives a lot of traffic and I don't want anyone to see it broken, especially since DNS propagation takes ages and it could potentially show the broken site for 24 hours or so.

So, does anyone have any suggestions please?

Αndré


ohara

Hi, it's super broken at the moment, with the following error:

QuoteNotice: Undefined offset: 8192 in /home/sott/public_html/smiles/include/debugger.inc.php on line 112

I think I need to update to the latest 1.4.x again, that sorted that error last time but then I managed to screw it up so royally that I deleted it all and started the restoration again before I left the studio to go home.

Once I have fixed that error I'll put the link here.

Ps. why the hell do I have to pass a captcha and a bunch of questions to make each post?

phill104

You should be running 1.5.x now.

Would still have needed a link so we could have looked at other files.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Quote from: ohara on December 07, 2012, 09:53:31 AM
Ps. why the hell do I have to pass a captcha and a bunch of questions to make each post?

Spam protection for the first couple of posts. I just decreased the number of questions, let's see if this still keep away the spam bots.

ohara


ohara

Right, back to 1.4.27 and I have also disabled all my plugins. I now have something which much more closely resembles my original gallery.

http://dedi.smileserv.co.uk/~sott/smiles/

There are still a few images missing though. I need to find out what is happening with that.

ohara

Sorry to double post (there's no edit button on here!) but I should just add I want to make sure everything is working properly before I make the jump to 1.5 :)

phill104

What images are missing? As you have a closed gallery we cannot see anything other than the logon page making it hard to advise. Either make it public or give us a user account so we can see the problem.
It is a mistake to think you can solve any major problems just with potatoes.

ohara

Sorry, forgot it was user-only. I have turned on unregistered access now so you can see it. There are custom images on each of the albums, and also most of the sub-albums. These are present both on the existing site and the new site so regardless of whether it is coded with relative or absolute links it should work. See my attached image.

However, I cannot find the file which contains the code to display these images! Where am I going wrong?

ohara

Right, it seems that I stupidly overlooked the fact that those were stored in SQL as the category description. It appears to allow BBcode.

On the existing site it works perfectly. However on the new site it seems to be behaving strangely. I'm not sure whether this is due to the difference in version or what. I can see from the source code that it is not trying to display the image, but instead it is setting the img url from the bbcode in the cat description to the alternative text of another image like so:

<img src="images/thumbnails.gif" alt="" title="http://www.smileonthetiles.com/smiles/images/cats/plymouth.jpg">
<img src="images/descending.gif" alt="" title="http://www.smileonthetiles.com/smiles/index.php?cat=2">


On the existing site which works the code is as follows:

<a href="http://www.smileonthetiles.com/smiles/index.php?cat=2" rel="external"><img src="http://www.smileonthetiles.com/smiles/images/cats/plymouth.jpg" alt=""></a>
<img src="http://www.smileonthetiles.com/smiles/images/cats/plymouth.jpg" alt="">

ohara

I tried using searchnew.php and it gives me this error:

QuoteFatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0

Turning on output buffering in php makes no difference (the old server has it turned off and that works fine).

phill104

Here is what I suggest you do. Return to your old server and update hat from 1.4.x to the latest 1.5.x release. Once that is working only then can we try to move it to your new server. There are a lot of changes in 1.5.x and we do not want to waste time trying to fix problems here that may have already been fixed in 1.5.x
It is a mistake to think you can solve any major problems just with potatoes.

ohara

Yeah I completely understand. I do not want to risk updating my existing site to 1.5 as if it breaks I cannot afford the downtime which will result in restoring a backup. The trouble is that the version I am running is so outdated, things are bound to break during the upgrade process.

I have done an install of 1.5.x on the new server and let it update the SQL database. It seems to be working ok for now, better than the updated 1.4.x one was. Obviously my theme needs re-writing but that is not absolutely essential right now.

ohara

Right I'm still having a few problems with 1.5:

searchnew.php does not work (there is some heavy activity by php5 on the server for a bit, then I just get a white page)
javascript doesn't seem to work

phill104

Enable debug and post a link to the wherever it does not work. Does it work with the default curve theme?
It is a mistake to think you can solve any major problems just with potatoes.

ohara

Right I'm gonna start the upgrade process again and then do the debugging. Is it best to upgrade to 1.4.27 first or straight to 1.5.x?

Αndré

#17
I suggest to upgrade to cpg1.4.27 first, but I'm not sure if it's mandatory (haven't checked the database changes).

ohara

Right I'm back on 1.5.x now. With debug on I get the following errors on the index page:

Quote/index.php
Notice line 466: Undefined variable: FORBIDDEN_SET
/include/functions.inc.php
Notice line 4331: Undefined variable: result

And in the admin.php:

Quote/include/functions.inc.php
Warning line 4173: ksort() expects parameter 1 to be array, null given
Warning line 4183: Invalid argument supplied for foreach()
Warning line 4173: ksort() expects parameter 1 to be array, null given
Warning line 4204: Invalid argument supplied for foreach()
Notice line 5739: Undefined variable: language_array
Notice line 4331: Undefined variable: result
/themes/smile/theme.php
Notice line 1254: Undefined index: display_faq
Notice line 1291: Undefined index: faq_title
Notice line 1292: Undefined index: faq_lnk

Also I don't think my gallery thinks that I have gd installed even though I do. Although this isn't too important as I don't do any image manipulation on the server anyway.

I notice the login form on the top left of the page doesn't work, I guess this has been removed from the latest version?

Any help is much appreciated.

Joe Carver

Your theme probably needs to be updated as a start.

Take a look at the docs and apply the needed changes. Of course you could use a default theme for testing purposes.