home server photo gallery

Call me difficult, but I’m not a big fan of most photo gallery software. After some serious trial and error I finally found something I can live with: Single File PHP Gallery.

After the last workstation upgrade at home I had trouble getting an aging Apache::Gallery configuration to work. This is a perl module that creates thumbnails for and formats the display of images in a directory or directories. The best thing about it was that the software didn’t touch the original files and didn’t require any kind of database for metadata storage. The thumbnails were generated and stored in a separate cache directory outside the data folder structure.

But Apache::Gallery hasn’t been updated for some time, and building it takes some effort on newer systems because many of its dependencies are stuck in the past.

So I went looking for some kind of replacement that was at least as simple and, most important of all, non-intrusive. Most of what I found either required a database or made it necessary to “import” images into a proprietary content management system (CMS). Those that didn’t were lacking in one way or another, either in functionality or styling. The former was obviously more important than the latter, since anything that was functional enough would be worth a later investment in re-styling.

Once I found Single File PHP Gallery (SFPG) I knew my search was over. Here was a single php script that could scan a group of folders, create the necessary thumbnails, and then display them in a minimalist interface — all without actually touching the original image files.

Installing SFPG was as simple as dropping the index.php script in the root of my shared pictures folder (which was in turn symlinked into my web server’s DocumentRoot) and creating a _sfpg_data directory permissioned so that my web server user had owner and read-write rights.

The only drawback is that the script can’t create thumbnails for video files. Since my still images and video files are stored in separate folders by file type that’s not a major problem, although I’ll continue hunting for a script that can handle those video files as efficiently as SFPG can still images.

This entry was posted in System Administration on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).