Scientific Image DataBase, v0.41 release notes

See the file modifications.html for details.

Upgrade

To upgrade from versions prior to 0.40, DO NOT copy all files over the old ones. Better make a parallel installation in a new directory, keeping the old files as a backup.

CAUTION: many component files have been renamed since versions prior to 0.40. Please carefully follow these instructions below, and contact Jose Viña if you find any problem.

Copy the sidbv041.tar.gz archive to the directory containing your sidb directory, i.e.

ls
should show:
sidb   sidbv041.tar.gz

Now issue the following commands while logged in as your system's root:
mv sidb old_sidb
gunzip sidbv041.tar.gz
tar -xvf sidbv041.tar
The new files will be expanded to directory sidb. Copy your old configuration files to the new directory to keep that information, otherwise new files will be created (you shouldn't overwrite them later, as some changes will be included during installation):
cp old_sidb/index.php sidb
cp old_sidb/index_inc.htm sidb
cp old_sidb/include.php sidb
cp old_sidb/includes/config_inc.php sidb/includes
Assing the appropiate ownership and permissions to the new directory:
chown -R wwwrun sidb

where wwwrun is the user name of your webserver (nobody or apache are typical names in other linux distributions). Assign permissions to this directory with

chmod -R 700 sidb
When upgrading, it is always a good idea to make a backup of the contents of the Postgres database, with the command
pg_dump dbname > outfile
where dbname is usually sidb and outfile is any filename where you want to output the backup. Read the Postgres documentation for further details abour backup and restore (http://www.postgresql.org/docs/).
If you upgrade from a pre-version 0.3 database you will have to run the script 'convertpwd.php'. Point your browser to 'convertpwd.php', enter the sysadmin password, and the passwords in the database will be encrypted.
Login into the database (using your browser, and as the databasa system administrator), choose globals, and press the 'submit' button. All necessary adjustments will be made by the script install.php.

IMPORTANT: since version 0.40, all .ids files (part of the ICS standard) are compressed into gz. This may take a while when updating your database. A backup of your images is highly recommendable. For this to run properly, you must specify the correct location of your zipping tool (like /usr/bin/gzip) in the database globals.

New installation

To freshly install sidb, follow these instructions:

You will need the following:

The following components will add functionality you might want:

Except for Huygens and ImageJ, most needed software is included in the current linux distributions (I tested redhat 7.0 and 7.1 as well as SUSE 7.0 and 7.1, but others should work equilly well).

Mac OS X comes with apache pre-installed. A package for Postgres can be found at http://www.osxgnu.org or at Marc Ilianage's page. The latter also contains a php version compiled with postgres support and Imagemagick. That particaly Imagekagick package does not appear to deal with Tiff files though ;(.

Installation Instructions

Login as the user running the webserver (wwwrun under SUSE, apache under Red Hat, www under Mac OS X - note that OS X does not let you login as www, use another account and after the gunzip and tar step below, type: sudo chown -R www *).

Navigate to a folder in your web-tree (under SUSE, the highest level directory in your web tree is /usr/local/httpd/htdocs. On Mac OS X you might put sidb in any user's 'Sites' folder). Unpack the file 'sidav0xxb.tar.gz' by issuing the following commands:

gunzip sidbv0xx.tar.gz
tar -xvf sidbv0xx.tar

All sidb related files are placed in a directory called 'sidb'. You can place sidb in your top-level web-directory, making it possible to start sidb using http://localhost. For this to work, make sure there is no file called index.htm in your top-level web-directory and that 'index.php' is an argument for the apache variable 'DirectoryIndex' in the file 'httpd.conf'. If you did not install the files as the user running the webserver, changes ownership now, for instance by entering (you have to be root for this to work):

chown -R wwwrun sidb

Assign permissions to this directory with

chmod -R 700 sidb

The following subdirectories are under sidb the first time: 'archive', 'thumbnails', 'includes', 'images', 'frontims', and 'docs'. All image files you upload to sidb will be stored unchanged (but renamed by adding a number in front of the original filename) in the directory 'archive'. For increased security, during the installation you will be able to move 'archive' and 'thumbnails' out of the web-tree. Making sure you specify directories that can be read and written by the account running your webserver daemon (and preferably nobody else). Leave the other directories within the web-tree unchanged. For even more security, you may set your Apache settings such that the subdirectory 'includes' cannot be read directly through a browser.

After all the previous requirements are fulfilled, point your browser to the file install.php in the top-level directory. Follow the instructions carefully. Do not be overwhelmed by the many options. Initially, you can safely accept the proposed settings.

Check the following php directives (they are stored in a file called "php.ini" which location you can find by running the script info.php):

max_execution_time:You might want to increase this to 120 sec.
display_errors: For a 'production' site, switch this off.
register_globals: Set to 'Off'. Leaving this on is a potential security hazard.
post_max_size: Together with 'upload_max_size' these determine the maximum file size that can be uploaded to your server through html file uploads.
magick_quotes_gpc: Should be 'On'.
file_uploads: Should be 'On'.
upload_max_filesize: Together with 'post_max_size' this one determines the maximum file size that can be uploaded to your server through html file uploads.
safe_mode: Should be 'Off', otherwise 'outside' scripts/programs can not be called. Suse has this 'On' by default. You might want to check this switch if your sidb installation does not create thumbnails..

If you so wish, you can patch ImageJ yourself. Move the ij.jar file to be patched to your sidb directory. Issue the commands:
cd imagej/classes
zip -r ../../ij.jar *

Mpeg2encode is installed along with Imagemagick in some distributions, but not in others. If no movies are generated, check whether mpeg2encode is installed on your system (by issuing the command "mpeg2encode"). If not, check your distributions CDs or download the sources and compile them.

'Vacuum' the database regularly (the 'vacuum' button can be found under 'globals'). At the same time, images whose expiration date have past will be removed (after giving the owners notice by email at least one week in advance), and 'old' files will be compressed.

If you have problems, please let me know

Nico Stuurman, Jose Viña, last modified: July 7, 2006