Page 1 of 1

[Solved] point to another hard disk

Posted: 28 Mar 2009, 12:42
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

Re: point to another hard disk

Posted: 30 Mar 2009, 18:54
by Jan
Hi, this you must try, I have no experience with it :-(

Jan

Re: point to another hard disk

Posted: 30 Mar 2009, 22:38
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

Re: point to another hard disk

Posted: 31 Mar 2009, 00:01
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

Re: [Solved] point to another hard disk

Posted: 02 Apr 2009, 00:08
by Jan
Great to hear it, thank you for this guide, Jan