Page 1 of 1

Is it possible to keep the image files on a separate storage

Posted: 19 Jan 2015, 12:29
by clupus
Hello,

I have the following situation: I have two machines (in fact they are virtuel ones). One is hosting a site via jommla and has a phoca gallery within it. The oder host has a large disk attached and many images and other stuff is stored there. (This separation is done due to other considerations, I do not want to change it.)

Now I want to publish images from the storage host via phoca. It should be possible to access the files via network on the apache host and set some sort of link inside the DocumentRoot. So it should be possible to access the files in general.

1. Is it possible to avoid saving the images in two places (on apache and on storage host)?
2. Does the directory need to be writable? (I think of the thumbnails)
3. If 2 is yes: Can I somehow change the thumbnail path to a different location (at best globally)?

Thanks a lot
Christian

Re: Is it possible to keep the image files on a separate sto

Posted: 21 Jan 2015, 01:58
by Jan
Hi,

1) I think, this should be a question on server expert, really no idea - in fact if you are storing image on Picasa or Google+ or Facebook, you can export them to Phoca Gallery and in such case they will be stored only on external server :idea:
2) yes, you need to have rights (ftp or script) to write thumbnails on the server (this is not in the case of external images - Picasa, Google+, Facebook - the thumbnails are stored on external server
3) the thumbnail path needs to be changed directly in the code :-( - see path library: administrator/components/com_phocagallery/libraries/phocagallery/path/path.php

Jan

Re: Is it possible to keep the image files on a separate sto

Posted: 21 Jan 2015, 10:23
by clupus
OK, I worked in the meantime a bit on it. As the gallery is not (yet) available to the public there is no problem in trial-and-error solutions.

I got it working with a trick on linux base:
I created a second partition on the NFS server that is world writable. Then I create a new aufs filesystem to overlay the original images with the newly created partition. This aufs gets exported and used inside the apache server as a basis for the images.
The only drawback is that all images must be read only for the user that runs the apache server and all folders must be readable. Otherwise the gallery cannot create the thumb folders. The files need to be read only (in fact it just a feature ;-)) to avoid that the gallery can alter these. Altering woul involve copying the whole file to the newly created filesystem which might get filled up quite fast in this case and that leads to doublettes.

To alter the path in the gallery by altering the source code is no good idea in my opinion. This might be done in future but not in 5 minutes. Here one might consider further implications in the whole gallery. Or alternatively you might add it to you task list if you like. For me -- I hope -- I found a valid solution.

Thanks a lot
Christian

Re: Is it possible to keep the image files on a separate sto

Posted: 23 Jan 2015, 01:00
by Jan
Ok