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] 2 3 4   Go Down

Author Topic: Migrating coppermine gallery to another server  (Read 68946 times)

0 Members and 2 Guests are viewing this topic.

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Migrating coppermine gallery to another server
« on: December 07, 2012, 08:30:13 am »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Migrating coppermine gallery to another server
« Reply #1 on: December 07, 2012, 09:09:39 am »

Please post a link to your new gallery.
Logged

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #2 on: December 07, 2012, 09:53:31 am »

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

Quote
Notice: 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?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Migrating coppermine gallery to another server
« Reply #3 on: December 07, 2012, 10:13:34 am »

You should be running 1.5.x now.

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Migrating coppermine gallery to another server
« Reply #4 on: December 07, 2012, 10:22:38 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.
Logged

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #5 on: December 07, 2012, 10:48:46 am »

Thanks Andre.

The link to the temporary new site is http://dedi.smileserv.co.uk/~sott/smiles/
Logged

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #6 on: December 08, 2012, 12:29:59 am »

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

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #7 on: December 08, 2012, 12:30:38 am »

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 :)
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Migrating coppermine gallery to another server
« Reply #8 on: December 08, 2012, 01:00:35 am »

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

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #9 on: December 08, 2012, 01:40:38 am »

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

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #10 on: December 08, 2012, 03:32:42 am »

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:

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

Code: [Select]
<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="">
Logged

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #11 on: December 08, 2012, 08:23:08 am »

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

Quote
Fatal 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).
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Migrating coppermine gallery to another server
« Reply #12 on: December 08, 2012, 09:09:08 am »

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

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #13 on: December 08, 2012, 09:39:05 am »

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

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #14 on: December 10, 2012, 10:20:50 am »

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
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Migrating coppermine gallery to another server
« Reply #15 on: December 10, 2012, 10:45:21 am »

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

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #16 on: December 10, 2012, 09:59:46 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Migrating coppermine gallery to another server
« Reply #17 on: December 10, 2012, 10:07:37 pm »

I suggest to upgrade to cpg1.4.27 first, but I'm not sure if it's mandatory (haven't checked the database changes).
« Last Edit: December 11, 2012, 06:22:09 am by Αndré »
Logged

ohara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Migrating coppermine gallery to another server
« Reply #18 on: December 13, 2012, 01:56:33 am »

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

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Migrating coppermine gallery to another server
« Reply #19 on: December 13, 2012, 02:21:54 am »

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.
Pages: [1] 2 3 4   Go Up
 

Page created in 0.03 seconds with 20 queries.