Photo Galleries! I've tested dozens of them and they all seem to have their own weak points. They're either too slow, or too big, or have insuffient facilities, or too many facilities, etc., etc. Anyway, I seem to have come across one that really does what it says it does! It's quite small, very configurable, and very fast. It's a work in progress by a single man (as far as I can tell) and has presently reached a 1.5 release. Although labelled RC4, I haven't found any real faults with this system so far. It is designed with Canon gear very much in mind, but can be easily configured to forget all the pre-installed Canon data if required.
The software is called Exhibition Engine and can be found at:
http://www.photography-on-the.net/It's a tad awkward to install on an SME server because of the in-built limitations imposed by the FTP system. Nevertheless, it can be done and for anyone who's interested, here's how I did it.
To get the EE up and running, we need the following:
PHP 4.3.8 at least
ImageMagick
A MySQL database
An SME user specifically for use by EE
Some custom templates for creating /etc/proftp.conf and /etc/httpd/conf/httpd.conf
A bit of patience.
Before I describe the procedure, I should add that my server is a V5.6 server and has been used for all sorts of evaluations and experiments and so it's quite possible that I've omitted the odd dependancy or two. If, during the installation process described below, you come across unsatisfied dependencies, you'll have to figure them out yourself!
PHP
Make sure that at least PHP4.3.8 is installed. There are many references to how to install or upgrade PHP in contribs.org. Do
# rpm -qa | grep 'php'
at the command line to get the information.
ImageMagick
The installation of Image Magick is described elsewhere in contribs.org forums. To recap, you'll need to obtain and install the following RPMs.
ImageMagick-5.4.9-1.i386.rpm
ImageMagick-devel-5.4.9-1.i386.rpm
ImageMagick-Magick++-5.4.9-1.i386.rpm
ImageMagick-perl-5.4.9-1.i386.rpm
libungif-4.1.0-10.i386.rpm
netpbm-9.24-9.73.4.legacy.i386.rpm
XFree86-libs-4.2.0-8.i386.rpm
Once installed, typing
# convert
should give you an output. If that doesn't work you'll need to work on the installation of ImageMagick until complete.
MySQL database.
Before attempting to install EE, you'll need to define a database. In the following example, 'localdba' is a MySQL user with all privileges. It is used in place of user 'root'. If you usually use the MySQL root user for creating and manipulating databases, do so now. In any case, create the database as:
# mysql -u localdba - p
Enter password: password>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1853 to server version: 3.23.49
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>create database ee;
mysql>grant all on ee.* to ee@localhost identified by 'ee';
mysql \q
This has created a new, empty database called ee and a MySQL user called ee who has all privileges on localhost and whose password is ee. You may want to choose more secure names. The database will be populated by EE during the installation process.
A user for EE
Using the standard SME server web interface, create a user called ee-access and set a password for the user. Note that this effectively creates another Windows domain user - you may want to find a way of disabling this new user.
It's tempting to install the EE system in an ibay, but the way that the FTP system works on an SME server makes this well nigh impossible - at least for me!
The next best thing is to install EE in the /opt tree.
Create a directory /opt/ee-rc4 and make it shared.
# mkdir -p /opt/ee-rc4
# chown root:shared /opt/ee-rc4
That's the pre-requisit work done. We now need to get, install and configure the EE system.
Download the EE system from the
www.photography-on-the.net website. The version I used was 1.5RC4 and came as a zip file called EE-RC4.ZIP. Unzip the file using 'unzip'. This results in a new directory structure EE_RC4 being created.
Move the entire content of the newly created EE_RC4 directory to /opt/ee-rc4
# cd /<wherever>/EE_RC4
# mv * /opt/ee-rc4
Make sure that the Apache server can read the files
# cd /opt/ee-rc4
# chown -R root:shared *
Now we need to adjust the permissions on some of the directories
# chmod 777 /opt/ee-rc4/temp
# chmod 777 /opt/ee-rc4/ftp_temp
# chmod 777 /opt/ee-rc4/export
# chmod 777 /opt/ee-rc4/input/temp
# chmod 777 /opt/ee-rc4/input/UPLOAD
# chmod 777 /opt/ee-rc4/input/UPLOAD/test
# chmod 777 /opt/ee-rc4/input/UPLOAD/ee_temp_upload
# chmod 777 /opt/ee-rc4/input/backup/ee_backup_files
Next we need to tell EE about the database we created earlier. Open
/opt/ee-rc4/add/connect.php in an editor and modify
$servername = "localhost";
$databasename = "DATABASENAME";
$username = "USERNAME";
$password = "PASSWORD";
with the data that relates to your database. ("localhost", "ee", "ee", "ee" for the example given).
Then do similar for
/opt/ee-rc4/input/backup/ee_backup_prefs/preferences.php
Modify
connect_menu ("localhost", "DATABASENAME", "USERNAME", "PASSWORD", "100" );
to
connect_menu ("localhost", "ee", "ee", "ee", "100" );
We just need to made a few changes to the SME server environment before attempting to complete the installation.
Create an httpd.conf fragment as follows:
# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
# touch 92ee
# pico 92ee
Add the following content ....
Alias /ee /opt/ee-rc4
<Directory /opt/ee-rc4/>
AddType application/x-httpd-php .php .php3 .phtml
Options Indexes +Includes FollowSymLinks
php_flag safe_mode off
php_flag magic_quotes_gpc off
php_flag display_errors off
php_flag file_uploads on
php_flag log_errors on
php_flag register_globals off
php_value max_execution_time 6000
php_value memory_limit 200M
php_value upload_max_filesize 50M
order deny,allow
deny from all
allow from all
</Directory>
.... and then exit pico
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# service httpd configtest
If that works OK, then
# service httpd reload
Now create a proftpd.conf fragment as follows:
# mkdir -p /etc/e-smith/templates-custom/etc/proftpd.conf/
# cd /etc/e-smith/templates-custom/etc/proftpd.conf/
# touch 42ee
# pico 42ee
Add the following content ...
<Directory /opt/ee-rc4/*>
AllowOverwrite on
GroupOwner shared
Umask 002
<Limit WRITE>
Allow from 127.0.0.1
</Limit>
</Directory>
<Anonymous /opt/ee-rc4>
User ee-access
Group users
AnonRequirePassword on
UseFtpUsers on
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Limit LOGIN>
Allow from 127.0.0.1
</Limit>
<Directory *>
<Limit WRITE>
Allow from 127.0.0.1
DenyAll
</Limit>
</Directory>
</Anonymous>
.... and then exit pico
# /sbin/e-smith/expand-template /etc/proftpd.conf
# service proftpd reload (there's no configtest, unfortunately)
Now we're ready to finish the installation of EE. Using a browser on a workstation connected to your server, visit the following URL
http://<yourserver>/ee/rc4_installers/full_15rc4.php
When the login screen appears, log on with username="admin", password="pass"
You should now follow the excellent directions given in
http://www.photography-on-the.net/ee...oad_system.php TO THE LETTER!!!!!
There are some things that are not as obvious as they might be, and these clues may help ....
Settings/misc. settings/Global Settings.
Make sure your URL is entered here or you end up with corrupt URLs being generated on photo pages.
Graphics modules.
Make sure ImageMagick is functioning correctly.
FTP Server setup.
I ended up with the following (you'll see where they fit in when you get to the FTP setup bit).
In tab FTP servers, 1st entry ...
local localhost ee-access ee-access (tick) /temp
In tab EE Home ftp server, 1st entry ...
localhost ee-access ee-access / (tick)
Click on "Update All FTP Servers" make sure FTP Engine = PHP ftp module, and then run the tests.
Do the resize methods next.
I created 3 in the 'big sizes' section called min-size, normal, and max-size.
These had pixel lengths of 300, 560, and 1024 pixels respectively. I used the supplied thumbs and microthumbs resize methods.
Now go to the path setup. (Notice that the directory /photographs does not exist. You can replace the name with anything you want - it'll be created later). In the size paths I defined 3 called Normal size, Maximum size, and Minimum size. The URLs are
http://www.<domain-name>/ee/photographs/normal/ (and /max-size/ and /min-size/), the variables are 'default','max-size', and 'min-size', the FTP server is 'local' for all, the FTP Folder is '/photographs/normal', '/photographs/max-size', and '/photographs/min-size', and the resize methods are 560, 1024, and 300 respectively.
In the thumb paths, the data is:
http://www.<domain-name>/ee/photographs/thumb/, relative path = ../photographs/thumb/, FTP server=local, FTP folder = /photographs/thumb, and resize method = 110. The data is similar for microthumbs.
That's just about it then! However, because SME server is generally used as a Windows server, we can do one more thing to make life easy. Make a symbolic link in any directory supplied by the server that you can access from a logged on Windoze box to /opt/ee-rc4/input/UPLOAD. For example ...
# cd /home/e-smith/files/ibays/shared-files/files
# ln -s /opt/ee-rc4/input/UPLOAD ee-upload
Wondows users can then copy files directly to the Upload directory for later attention by the gallery administrator.
Have fun - it works for me! If you use it, send Pekka Saarinen some feedback - I'm sure he'll appreciate it.