Albums are not loaded after moving to other server

matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Thu, 2014-07-10 20:10

Hello,

I moved my gallery 3 to other server and followed this guide: http://codex.galleryproject.org/Gallery3:User_guide:Gallery3:Installing_and_upgrading#Moving_your_installation_to_a_different_server

I downloaded new gallery3 and set it with new database. Then I changed var folder with old one and in var/database.php changed settings for database.

One album gets loaded (so database settings are OK) and it already has 133 views (pictures not showing), but other 100+ albums are not loaded. (picture at attachments.

Where could be the problem? (.htaccess, symlinks) ?
Is there maybe a problem because probably on other server Gallery was version 3.0.*, but now its 3.0.9?

AttachmentSize
Screen Shot 2014-07-10 at 21.58.02.png360.56 KB
 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2014-07-10 21:40

1. You should have upgraded your G3 install to the latest version BEFORE moving it.

2. Yes, it could be htaccess, etc, but maybe not.

3. Check permissions on the var folder. (It's not uncommon for there to be an issue if you're changing from one host environment to another.)

4. Try rebuilding thumbs for an album and then, if that didn't work for that album, try running the maintenance tasks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-07-11 00:16

Are the thumbs and resizes viewable via a direct link?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Fri, 2014-07-11 08:45

tempg:

Quote:
Try rebuilding thumbs for an album and then, if that didn't work for that album, try running the maintenance tasks.

How do I rebuild thumbs and what do you mean with running maintenance tasks?

floridave: If I can access localhost/thumbs and localhost/resizes with direct link? Website was previously running on domain "www.pvanina.si" and now its running on localhost. Could that be the problem?

Best regards, Matevz

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-07-11 13:27

An example of a direct link would be:
http://www.langleycom.com/gallery3/var/resizes/Andrew.jpeg
So in your case it would be something similar to:
http://LOCALHOST/gallery3/var/resizes/PHOTO.jpeg if you had a image called PHOTO in the root album.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Sat, 2014-07-12 13:55

I can access all photos that were in photo albums...

http://shrani.si/f/j/3m/4UO1cO0I/1.png

http://shrani.si/f/2q/FY/14XDz52c/2.png

Is there maybe a problem with old URL because I had URLS like pvanina.si/var/resizes/Andrew.jpeg and now I have all at localhost, but I want to set it back to pvanina.si later...

There all also 16 000 inserts at g3_items table and all photos seems to be inside. I dont know what could go wrong. Maybe should I change some settings to override old links? But how?

 
matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Sat, 2014-07-12 16:15

I have created in new album and it is stored in the same folder as all other files. There is one album online, but I cant find it at var/albums folder.

 
matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Sat, 2014-07-12 16:16

I have created in new album and it is stored in the same folder as all other files. There is one album online from other server, but I cant find it at var/albums folder.

I can also login with old usernames and password, but I just can't show albums and pictures... :(

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2014-07-12 23:18

In order to diagnose further I would need a real www accessible url to the site. If it is local host you will have to figure it out looking at the source of the page to see where images are server/not served from.
If the urls to the image are 'localhost' and not 'pvanina.si' then you have some .htaccess rules or some server config that does not work right.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Mon, 2014-08-11 13:49

Hello,

I finally managed to put website online: www.pvanina.si

Images are accessible: http://pvanina.si/var/resizes/Nejc/Zima/2013/Struski-uzitki/Struska01.jpg

but there is just one album shown which is not even in var.

Where could be the problem that albums are not loaded? I am using the same database as last time (140MB big) running server.

Albums seems to be linked in database.. There are already numerous inserts in g3_items table.

Thank you for your answers.

Best regards, Matevz

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Mon, 2014-08-11 19:31

I'm thinking maybe you're NOT using the db you think you're using (and/or the db you're using isn't an exact copy of the 140MB db that it should be).

Check the database.php file in your Gallery's var folder to make sure you're using the correct db; also, be sure that you're using the same prefix setting that you were using before.

Also, check to make sure that the actual db is the same (not just the name and settings). Since you changed servers, you may have also changed the location of the db. (If it says "localhost" that's definitely a sign.) If that's the case, make sure that you successfully copied over the full db to the new server.

If you're using the correct db, the albums should show (even if the photos didn't actually load/exist).

Maybe @floridave will have some additional insight?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-08-12 04:07

I'm with tempg on this. I don't think you have the right DB or your DB is not functioning properly.
Use your DB admin tool to check the table for corruption and repair as needed.
It seems that the items table only has the one album in it and it should have more.

The albums with titles will show even if the var/ directory is not correct. In your case it seems the DB is not correct.

Failing all that you could use the server add method to add them back again (once you move them out of the /var/ directory. Let us know if that is the route you want to go.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
matevzmrak

Joined: 2011-02-24
Posts: 23
Posted: Tue, 2014-08-12 08:04

Thank you very much. Database was corrupted. Seems like there was a problem when exporting it because it was half of a size of on year old one.

Now I have loaded all albums which were created before last database backup (30.7.2013). Is there any way that upload all albums which were created after that date without adding one by one (There are just 15 albums)?

Best regards, Matevz

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2014-08-12 15:06
matevzmrak wrote:
Is there any way that upload all albums which were created after that date without adding one by one (There are just 15 albums)?

That's what @floridave was saying: "Failing all that you could use the server add method to add them back again (once you move them out of the /var/ directory. Let us know if that is the route you want to go."

Move all of the albums that you need to upload to a location OUTSIDE of the "albums" folder (but keep the folder structure intact). Then look at the serveradd module. I STRONGLY suggest you read through the module's docs before attempting. (And you may need to move the thumbs and resize folders as well, but I'm not 100% on that.)
http://codex.galleryproject.org/Gallery3:Modules:serveradd

I'm not a good resource on serveradd, but @floridave is also watching the thread and can assist.

EDIT: FWIW: If you're going to have to re-upload most of the gallery anyway--and if you're not concerned about keeping comments, view counts, changed descriptions, etc--I recommend just starting from scratch by creating a totally new db and then using serveradd to upload everything from scratch. Since there are already issues with the db, I'd think a fresh start would be a good thing if you can.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-08-12 15:07

Delete the thumbs and resizes from the /var/ directory of the items that were added after the backup.
Delete the directories (albums) from the /var/thumbs/ and /var/resizes directory(s).
Move the items in the same hierarchy from the /var/albums/ directory of the recently added items to a temp location on the sever outside the gallery directory.
Use the server add method to add those items that you moved out of the /var/albums/ directory.

Dave

__________________________________________
Blog & G2 || floridave - Gallery Team