Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Linux Open Source Software

Penguin Gallery - web photo gallery powered by PHP and AJAX

PenguinGallery Ajax web based photo viewer and slideshow

Penguin Gallery is a web photo gallery utilising the features of PHP and Javascript in a Ajax based web interface. When viewed on a browser with Javascript enabled then it uses the full Javascript Ajax smooth image loading with slide-show option. If javascript is not available or disabled then it provides a traditional html / http based gallery.


PHP version 5.0 or later is required. PHP version 5.3.0 or later is recommended, but versions between 5.0 and 5.3 can be used by using the disablenamespace.php script (see later for more details).

Version history

From version 0.2.0 Penguin Gallery now uses a mysql database backend.

From version 0.1.1 it can optionally be embedded within Wordpress.

Screen shot of Penguin Gallery in use on (v0.1.1)

Note that this software is at an early stage in development and there will be significant changes in future versions, but it is already in use on the sites below



Documentation is currently in progress whilst the software is going through some major changes. Note that the database entries may change in future versions and need to be reconfigured.


Extract the main program archive into a suitable place in your web path. Copy sample-gallery.cfg to default.cfg and edit the appropriate details - see comments within the sample configuration file. Also copy file sample-site1.cfg to an appropriate file (eg. site1.cfg). This is linked in default.cfg and needs to be updated there if the file name is changed. For security reasons is recommended that the second file is created outside of the web accessible directories.

The default administrator password is set to PenguinGallery. For security reasons this must be changed once installed.

If you are running PHP earlier than 5.3.0 then PHP does not support the namespace feature. This is enabled by default to allow maximum compatibility when used as a plug-in to other PHP based software (eg. CMS). If your version of PHP does not support this then open the following in your webbrowser:
If you are not sure what version of PHP you are running then you can call this anyway as it will not make any changes if running a more recent version.

If you get the following error then this means that namespace needs to be disabled:
"Parse error: syntax error, unexpected T_STRING ... on line 21"

Then access the following page in you webbrowser:
The mysql user configured will need to have the abillity to create database / tables during setup, but can be changed to a normal user afterwards.
The database can be created first if required, but the tables must not exist.

If you would like to use the included button images then they are included in the second archive.

You will need to use the admin page to create a category, album and import photos.

The gallery has to be embedded within an existing php file. First create the main page layout and then enter the following into the html (if using a GUI editor then use raw html mode)
<?php include("penguingallery/gallery.php"); ?>

Create a unique directory for each gallery and copy the photos into that folder (all must end with .jpg)
Create a subdirectory called sml (which will be configurable in future)
On a Linux based machine (with ImageMagick installed) run the following commands from inside the folder for each appropriate gallery.
mogrify -resize 450x450 *.jpg
for i in *.jpg; do convert -resize 150x100 -quality 80 $i sml/$i; done



This software is released under the GPL version 3.

Known Issues

This is currently an early release with some functionality missing. There is currently no handling of errors within the configuration files. All configuration files must contain valid PHP syntax.


These are some of the significant events in the development of the wQuiz program.