Using a folder in external drive to display on Single PHP Gallery

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
gasto
Posts: 44
Joined: Fri Dec 04, 2020 2:24 am

Using a folder in external drive to display on Single PHP Gallery

Post by gasto »

Hey guys,

I installed Single PHP Gallery from the Software list, but I wanted to know if there´s a way for Single PHP Gallery to display pictures I have in mnt/ext/pictures

Right now all the pictures must be in folders under var/www/gallery/

Thanks in advance as usual.
Regards.
User avatar
Joulinar
Posts: 4503
Joined: Sat Nov 16, 2019 12:49 am

Re: Using a folder in external drive to display on Single PHP Gallery

Post by Joulinar »

Hi,

I guess PHP Gallery is not capable for this. However you could try to create a sym link from inside /var/www/gallery/Folder pointing to /mnt/ext/pictures. But I'm not 100% if this will work
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gasto
Posts: 44
Joined: Fri Dec 04, 2020 2:24 am

Re: Using a folder in external drive to display on Single PHP Gallery

Post by gasto »

Thanks Joulinar for the suggestion.
You mean then to execute this command? ln -s /mnt/ext/Pictures /var/www/Gallery/Pictures
User avatar
Joulinar
Posts: 4503
Joined: Sat Nov 16, 2019 12:49 am

Re: Using a folder in external drive to display on Single PHP Gallery

Post by Joulinar »

At least it would be an idea
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gasto
Posts: 44
Joined: Fri Dec 04, 2020 2:24 am

Re: Using a folder in external drive to display on Single PHP Gallery

Post by gasto »

Thanks again Joulinar, the link didn´t work after all. I was searching on the index.php file and found this config:

Code: Select all

define('GALLERY_ROOT', './');

Set the path of the gallery root, where the images and sub directories containing images is placed.
I modified that path to my mnt/ext and seems ot be working, for some reason CPU usage is pretty high, but maybe it´s because it´s generating all the thumbnails.

Thanks!
User avatar
Joulinar
Posts: 4503
Joined: Sat Nov 16, 2019 12:49 am

Re: Using a folder in external drive to display on Single PHP Gallery

Post by Joulinar »

ah that's a good alternative :D
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply