[Solved] point to another hard disk

Phoca Gallery - image gallery extension
dadep2009
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Mar 2009, 12:21

[Solved] point to another hard disk

Post by dadep2009 »

This is the situation
I have my own home server with 2 Hard Disks. One (let's say ‘Disk1’) for the OS and the WebServer (and Joomla). The other one (‘Disk2’) with my data and images.
‘Disk1’ is too small for all my images, so I cannot put them in /../joomla/images/phocagallery.
I would like to let them on my 2nd Hard disk and “Phocagallery” to point to, let's say, /media/Disk2/images/phocagallery.
Is this possible?

I saw in another topic that there is the possibility to change (in PHP) the standard folder changing something in:

components\com_phocagallery\helpers\phocagallery.php
administrator\components\com_phocagallery\helpers\phocagallery.php

so I would like to point, instead to “./images/phocagallery” to “/media/Disk2/ images/phocagallery”
any suggestion?

Thank you
Daniele
Last edited by dadep2009 on 31 Mar 2009, 00:03, edited 2 times in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: point to another hard disk

Post by Jan »

Hi, this you must try, I have no experience with it :-(

Jan
If you find Phoca extensions useful, please support the project
dadep2009
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Mar 2009, 12:21

Re: point to another hard disk

Post by dadep2009 »

Ok. Thank you Jan for replying.
I will give it a try and I will post here my results. Hope I can give good news! :|
Daniele
dadep2009
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Mar 2009, 12:21

Re: point to another hard disk

Post by dadep2009 »

Good news! :D

I solved on Linux-side (I didn’t touch any PHP code). I forgot to say that on my server runs Ubuntu (Gnu/Linux OS).

I simply created, under ./images/phocagallery, a symlink (or soft link) to my second HardDisk with a command like: ln –s /media/Disk2/MyImages FolderDisk2 (where /media/Disk2 is my second HardDisk and FolderDisk2 is the name of a ‘virtual’ folder under ./images/phocagallery wich points to the folder MyImages on the second HardDisk).

Now, phocagallery treats the ‘virtual’ folder FolderDisk2 as a ‘real’ folder and shows the pictures that are, in fact, on my second drive under /media/Disk2/MyImages.

e.g. the file Florence.jpg is seen as it would be ./images/phocagallery/FolderDisk2/Florence.jpg, but in reality it is in /media/Disk2/MyImages/Florence.jpg

Phocagallery creates the ‘thumbs’ directory in ./images/phocagallery/FolderDisk2/thumbs but in fact it is created in /media/Disk2/MyImages/thumbs (on my second HardDisk).

This way I can have my pictures on my second (and bigger) Hard Disk and Joomla+Phocagallery running on my first Hard Disk.

Hope this help

Bye
Daniele
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [Solved] point to another hard disk

Post by Jan »

Great to hear it, thank you for this guide, Jan
If you find Phoca extensions useful, please support the project
Post Reply