How-to get Gallery running on a Freesco 0.3.x system

This how-to is written in such a way that (in my opinion) everybody, including people that are new to linux/Freesco, can use it. This means that for more experienced users this how-to is probably too expansive. Sorry for that ;-) But I remember my first Freesco-days when I read howto's that I couldn't understand because it assumed the possession of basic skills which I didn't have at that time.
In this how-to, commands you'll have to input are written in code blocks.

Enjoy, Wimpie

What is Gallery?

Gallery is a web based software product that lets you manage your photos on your own website. You must have your own website with PHP support in order to install and use it. With Gallery you can easily create and maintain albums of photos via an intuitive interface. Give accounts to your friends and family and let them upload and manage their own photos on your website! For more info take a look at the Gallery homepage:


Unfortunately it's not possible to get all the features of Gallery working with Freesco. This is because Gallery uses a couple of (optional) binaries which are not available for Freesco. Mind you, it can be done, but not without some serious work/compiling and that is outside the scope of this how-to. Features that won't work:

  • Multiple language packs (due to the missing of “system locales”)
  • Exif information (due to the missing of Jhead1)
  • Lossless rotation (due to the missing of JpegTran)
  • Watermark (Because the latest version of NetPBM does not work with the Freesco kernel)

All other functions should work properly. If you want a Gallery with all features enabled, install Slackware (or some other Linux-distro) on some old machine and run it from there ;-)

What do I need?

Well, of course you'll need al working version of Freesco 03x, I'm using 0.3.3 myself. I'm running it on a Pentium 200MMX-64Mb, and that's enough to keep my small Gallery working. Keep in mind that if you plan to put a lot of images in your Gallery, you'll probably need a system that is a bit faster. You also need a working Web server with PHP enabled. I use apache_1.3.27_dingetje-package with a kernel (I believe the 6th option) from the kernels-1.3-lightning-package 2) Another package you'll need is utils_1.0_dingetje 3). This package contains the tar and unzip commands you'll need to untar/unzip the files you're about to download. It also contains the vi-editor, which I'll use in this how-to. If you're not familiar with the vi-editor, look f.i here or one of the many other vi tutorials online. Of course feel free to use another editor like the build in freesco editor or the one in the mc package.
You'll also want a shell connection to your Freesco box using the standard Telnet-client or (better!!!) use SSH-access opensshd_3.7.1p1_dingetje-package. I use PuTTY to connect to Freesco with my windows machine.
If you do not have all the packages required, download them at or and install them ;-)

Gallery and NetPBM

First we'll download and “install” the latest version of Gallery. Create a directory in the /www directory where you want to install your Gallery (this can be anything you like).

cd /www
mkdir photoalbum
cd photoalbum

Now download the latest stable release of Gallery from the Gallery Download Page ( ) using the snarf command.


And untar

tar -zxvf gallery-1.4.4-pl4.tar.gz

You'll see that the tarball extracts itself into a gallery/ dir. Your Gallery-files are now located in /www/photoalbum/gallery

NetPBM are a couple of binaries that Gallery needs in order to handle the images you've uploaded. It resizes them and can create thumbnails etc. You can download a working version of NetPBM from the Gallery Download Page in the same way you've just leeched the Gallery tarball. Unfortunately the latest version of NetPBM (1.4) is too new for the Freesco kernel, so you'll need version 1.1. Take the linux-intel version. If you use this version, the “watermarking” part of Gallery does not work, but I can live with that ;-) You'll need to put the NetPBM files in a place like ”/usr/local/NetPBM”

cd /usr/local
mkdir NetPBM
cd NetPBM

move all the files to /usr/local/NetPBM Do not forget to make all files and the directory accessible

cd /usr/local
chmod -R 755 NetPBM/

Now you've installed all the stuff you need to get Gallery to work.

Check your php.ini settings

In your browser, type the following URL: http://my.router.url/photoalbum/gallery/setup/phpinfo.php
You should get a PHPinfo-screen. Check the following variables:

  • safe_mode - Safe mode must be disabled
  • disable_functions - exec() must not be listed in PHP's disable_functions directive
  • file uploads - File uploads must be enabled (set to 'On')

Also check if “session.cookie_domain =” is set to your host, and is not still at “”. See this FAQ for details.

If your settings are not right edit them in your php.ini file. This file is most likely located at: /usr/local/lib/php.ini
I use the vi-editor:

vi  /usr/local/lib/php.ini

Safe the file and restart apache

rc_httpd restart

and wait until the HTTP servers have restarted, then refresh/recheck the PHPinfo-screen and see if everything is correct.

Modify your httpd.conf

In order to make apache obey some commands in the .htaccess-file you'll make the next step, you'll have to add some lines in your htppd.conf file. It might be a safe idea to back up your httpd.conf by typing

cp httpd.conf httpd.conf.old

This way you can always get your web server to run again if you screwed things up :-)
Again we use the vi-editor.

vi /usr/local/apache/conf/httpd.conf

Search for the part of the file where the apache-access to directories is discussed and look for the part where they start talking about ”<Directory ”/www”>”. Scroll down a bit further until you come across the ”</Directory>” line.

Below this line you add the following lines:

<Directory "/www/photoalbum/gallery">
        AllowOverride Options FileInfo

Safe and exit the file (in vi this is ”:wq”)
Restart the HTTP-servers in order to let this change take effect

rc_httpd restart

Create necessary files and directories

cd /www/photoalbum/gallery

Use the vi-editor to create two empty files in this directory

vi config.php    (safe and exit)
vi .htaccess    (safe and exit)

Create a directory for your albums

mkdir albums

Create a temp-dir

cd /www
mkdir tmp

Now set the right permissions for the files/dirs you've just created

cd /www
chmod 777 tmp/
cd /www/photoalbum/gallery
chmod 777 albums
chmod 666 .htaccess
chmod 666 config.php
chmod 755 setup/ 

Set up your Gallery

Every time you want to access the setup of Gallery, you first have to set in into “configure”-mode.

cd /www/photoalbum/gallery

After you've finished setup, you'll have to put Gallery back into secure mode by


Ok, run the script and in your browser go to the following URL:

If you've done everything right, you'll see a screen with a lot of green boxes, some yellow and one red.

Status Reason
Yellow 12 of 13 NetPBM binaries
Yellow missing ImageMagick binaries
Yellow missing Jhead
Yellow missing JpegTran
Red missing System locales

Everything else should be green. You can now continue to step 2

Locations and URLs

Field Value
Album directory /www/photoalbum/gallery/albums
Temporary directory /www/tmp
Gallery URL http://your.router.url/photoalbum/gallery
Albums URL http://your.router.url/photoalbum/gallery/albums

Toolkits/Image processing

Field Value
Graphics suite to use NetPBM
Path to NetPBM /usr/local/NetPBM
PNM to JPEG converter ppmtojpeg

Optional Tools

Field Value
Unzip /pkg/bin/unzip

You can set up the rest the way you want it. Keep in mind that some features (like e-mail) won't work unless you've got a proper mail server running (doh).

Continue to Step 3 and 4 and save the configuration Secure the galley with:


Now go you your Gallery, URL: http://your.router.url/photoalbum/gallery/ And you can log in with the admin-account and password you've created in Step 2 of the Gallery-setup process.

Everything should be up and running and you can start uploading your albums/photos .

Something is not working!!!

  1. Read this how-to again en verify that you've completed every step successfully
  2. Run Gallery in Debug Mode (you can enable this in the Gallery-setup-pages) and look at the output it generates when you perform the action that is not working.
  3. Goooooooogle
  4. If you cannot solve the problem, ask at the Gallery forums (search the forums first!):
  5. If you think Gallery works fine, but the problem is Freesco, you can ask your question here (search the forums first!): of
1) jhead is available for download at
2) It's better to download a suitable kernel from
3) or utils_1.1_dingetje
freesco/howtos/gallery_03x.txt (198931 views) · Last modified: 2021/12/26 18:06 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki