After moving /var location the images upload fine but are not displayed properly in the WebUI
achmetinternet
Joined: 2013-10-29
Posts: 9 |
Posted: Tue, 2013-10-29 07:00 |
I wanted to move the location where files are stored (the /var folder) because I want to store the pictures (240GB) on a drive different from my root drive where I have Gallery3 installed. Before I moved the /var folder the picture upload went fine, thumbnail was created and it was showing in the gallery overview. I could also enlarge the picture and it was displayed correctly. After I moved the /var folder according to this http://codex.galleryproject.org/Gallery3:FAQ#I_want_to_move_my_.2Fvar_directory they are still uploading and generating the thumbnail but not showing in the preview. When I try to enlarge the picture it shows an empty white space and when I click then to see the original size image, it looks as if the link is broken. I can open the pictures fine on my samba share (which is where I moved the /var to) and there is also no error in the logfiles. |
|
Posts: 1857
Sounds like maybe your gallery is looking for the images in the old directory (or some other directory). Check the error logs to see where the site is looking for the images and then backtrack to find out why. Could be something specific to the theme you're using (e.g. a hardcoded instance of /var/).
Posts: 9
I checked in all /var/logs locations, i.e. the original one under the root directory and the one where I moved it to /mnt/samba/Pictures/var/logs but there are no errors showing there. As I said, the upload works fine, just that the pictures are not displayed. The name is shown and also information on when it was taken etc. but no image.
Posts: 1857
In this case, I meant your equivalent to the server logs; that's where you'd find the get request for the images.
Also, try using the default "Wind" theme and uploading a few images with it active, if you're not already.
Posts: 9
Is there something I should look out for in these logss, e.g. "gallery3"? Where would I find these logs in my Fedora 19 install? Am a bit of a noob with Linux.
EDIT: the theme activated is WIND, so far no help here.
Posts: 1857
Assuming you configured the server (i.e. installed Fedora yourself), you'd tell the server where to put the logs. There are also probably logs in
/var/logs/
, but they're slightly different; the error messages should still be there though. NOTE: This is the var folder at the root of the server, not the var folder inside your Gallery folder.You can also check the source code for the page to see what address it's using to try to find the files. Maybe it's still looking in the default var folder? Maybe you didn't enter the full server path?
Also, looking back over the thread, I'm not sure that you can store the images on an entirely different drive/server by just changing the var path--unless, maybe, the 2nd one is mounted to the first one. (You can get an answer to that by seeing where it's looking for the images.) Best case scenario is that you'd have to do a lot of modifying Gallery to get it to use separate servers for running the code and hosting the files.
EDIT: This is slightly different, but if you're using separate physical media (which I'm now thinking you are), but they are connected, check this as an alternative starting point: http://ubuntuforums.org/showthread.php?t=1801708
Posts: 9
But I don't think this is an error so the program does not file anything as an error. Most likely it is somewhere in either the index.php file or another similar one like the one where I changed the /var path. And what puzzles me is that it shows the filename but no picture to it...
Posts: 1857
The filename is the database; the image is not. (But the path to the image is--partially.)
If it's not showing the image, there are only 2 possibilities that come to mind: (1) It's not even trying to load an image; or (2) It's looking for the image in the wrong location.
If it's the 1st one, it would likely be a theme issue that went away when you swapped back to the default theme.
If it's the 2nd one, it will have a 404 error somewhere.
Posts: 9
I don't understand what you mean by "the filename is the database". You mean in the database? It means though it has loaded the picture correctly. So that is why I do not see an error displayed.
On the possibilities:
1) I never changed the theme, it was always WIND.
2) where would that error be if the picture was loaded correctly?
Posts: 9
Maybe we can try solving this later over IRC in the #gallery channel on freenode?
Posts: 1857
Yep, should have been "The filename is IN the database"
No, it doesn't mean that everything was loaded correctly.
The original post suggests that the thumbs and resizes are being generated (and I'll take that for what it is), but there is obviously still a problem.
You're going to have to find a way to either look at your error logs or parse the page code to see what URL the site thinks has the image.
Or post a link to the site.
Posts: 27300
That is my vote as well.
Then we can give more details and not just guess.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 9
Ok, will do. How do I make it accessible from the web though? Do I have to change something somewhere?
Posts: 9
OK, here is the URL to the site and you will see the result of me uploading pictures. The first one was uploaded with /var still in its original place.
http://gallery.worldwidehustle.org/
Posts: 27300
There is no indication of other items in the /var/album or var/resizes sso I suspect you have some file system permissions issue preventing the php process from writing to that new var location.
I have never been able to move my var directory but I think it is some host issue i have never chased.
Others in the community that have might offer some help.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 9
What other items were you looking for? Maybe the index.php is not pointing to the right /var folder since it shows the picture that was uploaded while /var was still in the root folder of the gallery installation but now after I copied the /var location and changed the two lines according to your wiki:
http://codex.galleryproject.org/Gallery3:FAQ#I_want_to_move_my_.2Fvar_directory
it uploads the jpg files into the album folder in the /var folder's new location, so the pictures are there but not showing up.
What would the permissions have to look like on the new /var location? 777? 775? What user is php running as usually?
Thanks for your help!
Posts: 2
I had a similar problem: after moving from /gallery/ to /foo/gallery, I could see spots for the pictures, but no real pictures. I was about to post when I poked through all the administrative menus one last time... the Maintenance menu has a "Fix a variety of problems..." task. I figured, what the hey, and ran it. All of a sudden, my pictures are displaying correctly!
Give it a shot (if you haven't already solved it); maybe it will help.
Good luck!
--Pkay