All text is available under the terms of the GNU Free Documentation License. For the latest version of this document, see Wikibooks.

Zoph/Upgrading

Contents

Zoph 0.7 to 0.7.3

You can also use these instructions to go from 0.7.0.x to 0.7.3, for an update from 0.7.1, 0.7.2 or 0.7.2.1, see 0.7.x to 0.7.x

Updating the Database

If you are upgrading from an older version than 0.7, please run the older database updates first.

Execute zoph-update-0.8.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.8.sql

The database upgrade script makes the following changes:

Configuration updates

(see Zoph/Configuration for details):

New options

Zoph 0.7.x to 0.7.x update

If you are upgrading from a feature release to another feature release, you need to edit zoph-update-0.8.sql. You should comment out the changes that have already been applied to your system. For example, if you are upgrading from 0.7.1 to 0.7.3, you will need to prepend the changes for 0.7.1 with a #, since you have already applied those changes when you updated to 0.7.1. After that, you can follow the instructions for 0.7 to 0.7.x.

Zoph 0.7.0.5

Please follow the instructions for 0.7.0.2.

Zoph 0.7.2 to Zoph 0.7.2.1

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Zoph 0.7 to 0.7.2 or 0.7.2.1

You can also use these instructions to go from 0.7.0.x to 0.7.2, for an update from 0.7.1, see 0.7.x to 0.7.x
Zoph 0.7.2 is a feature release, that introduces a few new features that will be available in v0.8. If you upgrade to v0.7.2, you will need to run the zoph-update-0.8.sql script. When you later upgrade to 0.7.3 or 0.8, you will need to run it again, but with the changes for 0.7.1 and 0.7.2. 'commented out'.

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Updating the Database

If you are upgrading from an older version than 0.7, please run the older database updates first.

Execute zoph-update-0.8.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.8.sql

The database upgrade script makes the following changes:

Configuration updates

(see Zoph/Configuration for details):

New options

Zoph 0.7.0.3 or 0.7.0.4

Please follow the instructions for 0.7.0.2.

Zoph 0.7 to 0.7.1 update

You can also use these instructions to go from 0.7.0.1 or 0.7.0.2 to 0.7.1
Zoph 0.7.1 is a feature release, that introduces a few new features that will be available in v0.8. If you upgrade to v0.7.1, you will need to run the zoph-update-0.8.sql script. When you later upgrade to 0.7.2 or 0.8, you will need to run it again, but with the changes for 0.7.1 'commented out'.

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Updating the Database

If you are upgrading from an older version than 0.7, please run the older database updates first.

Execute zoph-update-0.8.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.8.sql

The database upgrade script makes the following changes:

Configuration updates

(see Zoph/Configuration for details):

New options

Zoph 0.7 or 0.7.0.1 -> 0.7.0.2 update

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

You can upgrade directly from 0.6 to 0.7.0.2, simply use the zoph-0.7.0.2.tar.gz and execute the instructions for the 0.6 to 0.7 upgrade.

Zoph 0.7 -> 0.7.0.1 update

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory. or install the patch: cd to the location of your Zoph 0.7 installation and execute

patch < zoph-0.7.0.1.patch

You can upgrade directly from 0.6 to 0.7.0.1, simply use the zoph-0.7.0.1.tar.gz and execute the instructions for the 0.6 to 0.7 upgrade.

Zoph 0.6 -> 0.7 update

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Updating the Database

If you are upgrading from an older version than 0.6, please run the older database updates first.

Execute zoph-update-0.7.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.7.sql

The database upgrade script makes the following changes:

Configuration updates

(see Zoph/Configuration for details):

New options

Perl script changes

As of v0.7, you can set some defaults for zophImport from .zophrc. The example file zophrc.sample has been updated with these settings:

$datedDirs = 0;
$copy = 0;
$hierarchical = 0;
$verbose = 0;
$resolveSymlinks = 0;

zophImport now has an option to resolve symlinks during import. For more details, see Using the commandline tools

Zoph 0.5.x -> 0.6 update

Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Updating the Database

If you are upgrading from an older version than 0.5, please run the older database updates first. It is not necessary to update to 0.5.1 if you are still running 0.5.

Execute zoph-update-0.6.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.6.sql

The database upgrade script makes the following changes:

Configuration updates

(see Zoph/Configuration for details):

New options

Changed options

Perl script changes

As of v0.6, no settings need to be made in zophImport and <zophExport, it is replaced by a settings file .zophrc in the home directory of the user that runs these scripts. An example file called zophrc.sample is included with Zoph:

#-----------------------------------------
# Configuration file for Zoph
#-----------------------------------------
#
# Rename this file to .zophrc and place it in your home directory.
#
# All settings must match the settings with the same name in config.inc.php
#
# edit these to reflect your database
$db_host = 'localhost';  # hostname or hostname:port
$db_name = 'zoph';
$db_user = 'zoph_rw';
$db_pass = 'pass';
$db_prefix = 'zoph_';

#
# set this to your image directory
#
$image_dir = '/data/images/';

Note: the Debian version of Zoph was already using this configuration.

Zoph 0.5 -> 0.5.1 Upgrade

Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory. No datebase changes are needed for this release.

Zoph 0.4 -> 0.5 Upgrade

Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Updating the Database

If you are upgrading from an older version than 0.4, please run the older database updates first.

Execute zoph-update-0.5.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.5.sql

The database upgrade script makes the following changes:

Configuration updates

A few new configuration options have been added in Zoph 0.5.

Forcing SSL

You can now force the usage of SSL for the web interface, either just for logging on or for the entire Zoph session. You can control the behaviour by adepting the following settings:

define('FORCE_SSL_LOGIN', 0);
define('FORCE_SSL', 0);

You will also need to tell Zoph at what URL it can be found, because it will need to redirect users from SSL to plain and vice versa:

define('ZOPH_URL', 'http://myserver.com/zoph');
define('ZOPH_SECURE_URL', 'https://myserver.com/zoph');

For more details see FORCE_SSL_LOGIN, FORCE_SSL, ZOPH_URL and ZOPH_SECURE_URL.

Using watermarks

You can now have Zoph add a watermark to the high resolution images, to prevent unauthorized use of your photos. The watermark is a partly transparant GIF image that needs to be placed in your IMAGE_DIR. To use watermarking, make the following changes to your configuration:

define('WATERMARKING', 1);
define('WATERMARK', 'watermark.gif');

You will also need to enable the image service if you have not already done so:

define('USE_IMAGE_SERVICE', 1);

For more details see WATERMARKING, WATERMARK and USE_IMAGE_SERVICE.

Web import changes

A few changes have been made to the web importer. To delete an uploaded ZIP file after a successful import, change this line in the configuration:

define('REMOVE_ARCHIVE', 1);

To enable dated directories in the Web importer:

define('USE_DATED_DIRS', 1);
define('HIER_DATED_DIRS', 0);

To enable hierarchical dated directories in the Web importer:

define('USE_DATED_DIRS', 1);
define('HIER_DATED_DIRS', 1);

The default UMASK and DIR_MODE have been changed as of v0.5:

define('IMPORT_UMASK', 022);
define('DIR_MODE', 0755);

For more detais, see REMOVE_ARCHIVE, USE_DATED_DIRS, HIER_DATED_DIRS, IMPORT_UMASK and DIR_MODE.

Adding multiple people at once

You can now add multiple people at once using the edit photo page or the bulk edit mode. To enable this feature, set MAX_PEOPLE_SLOTS to a reasonable maximum (recommendation: 5-10).

define('MAX_PEOPLE_SLOTS', 5);

After that, go to the preference page and set "number of people to add at once" to a number that is convenient for that user. Each user can indivually set this number, but never higher than the number defined in MAX_PEOPLE_SLOTS. Bear in mind that setting either to a (very) high number, could (severely) impact performance.

For more detais, see MAX_PEOPLE_SLOTS

Zoph 0.3.3 -> 0.4 Upgrade

Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

Updating the Database

If you are upgrading from an older version than 0.3.3, please run the older database updates first. If you have been using a 0.4-pre version, you do not need to update the database again.

Execute zoph-update-0.4.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.4.sql

The database upgrade script makes the following changes:

Updating configuration

A number of configuration items have been added since v0.3.3. You can use the list below to update your current configuration file, or simply use the one in the distribution and change it to your needs.

Set DB_PREFIX to a prefix for each tablename, see db update for details. Suggested is to use 'zoph_', as this will be the default in future releases. Make sure $db_prefix in zophImport and zophExport matches this setting.

Much of the style information has been removed from the HTML code and is now in a separate CSS file. Please set CSS_SHEET to 'css.php' to load the CSS file.

You can now choose the authentication method used by zoph; set $VALIDATOR accordingly. Possible choices:

'default_validate':

   use the 'old' authentication method, probably the best choice for most.

'htpasswd_validate':

   use htpasswd to validate users.

'php_validate':

   let PHP take care of validation. See http://www.php.net/features.http-auth

You could also write your own authentication module; make it a function in validator.inc.php and set $VALIDATOR to it's name.

You can automatically send a copy of each e-mail sent from Zoph to a predefined address by setting BCC_ADDRESS to that address. Zoph includes a link to the site when notifying a user of (new) access rights. If Zoph is unable to determine the correct URL itself, please set ZOPH_URL to the correct value.

If you want to be able to annotate photo's, set ANNOTATE_PHOTOS to 1 and set ANNOTATE_TEMP_DIR and ANNOTATE_TEMP_PREFIX to a sensible value (suggested: '/tmp' and 'zoph').

To set the destination path in the web import to some default value, define the variable DEFAULT_DESTINATION_PATH; suggested value: 'uploads/date(Y.m.d)'. To hide this path from non-admin users, also define SHOW_DESTINATION_PATH and set it to 0, if you do not want to hide it, set it to 1.

To allow users to rate photos, set ALLOW_RATINGS to 1; otherwise to 0.

Zoph can now rotate images for you. Add the following settings and adapt where needed:

// allow images to be rotated
define('ALLOW_ROTATIONS', 1);
define(ROTATE_CMD, 'convert');
//define('ROTATE_CMD', 'jpegtran');
// set to 1 to backup the original before it is rotated
define('BACKUP_ORIGINAL', 1);
// copy the original to a file with this prefix
define('BACKUP_PREFIX', 'orig_');

Zoph 0.3.2 -> 0.3.3 Upgrade

If you are upgrading from a version previous to 0.3.2, please run the older database updates first.

Updating the Database

This update adds a new column to the prefs table.

Execute zoph-update-0.3.3.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.3.sql

Updating the Templates

Copy over php/* to the location of your installation (back up your old config.inc.php first if you need to). Make sure to also copy the php/lang subdirectory as there are additions to the language files.

There are a few new settings in config.inc.php. The old WEB_IMPORT setting was replaced with CLIENT_WEB_IMPORT and SERVER_WEB_IMPORT so that you can enable/disable one or the other if you like.

This release also supports the uploading of zip and tar files. Set the UNZIP_CMD and/or UNTAR_CMD to enable this. This feature extracts the images to a temp folder before loading them. The path to this folder is set by EXTRACT_DIR.

Another new feature is the addition of a pref to let photo descriptions appear under the thumbnails. The MAX_THUMB_DESC config sets the maximum number of characters to display.

A New Export Script

You'll find a new perl script in this release, bin/zophExport, which can be used to create static html galleries of your photos. See the manual for more info.

Zoph 0.3.1 -> 0.3.2 Upgrade

If you are upgrading from a version previous to 0.3.1, please run the older database updates first.

Updating the Database

The only thing added in this update are four new color schemes. You an skip this if you don't think you will use them.

Execute the statements in zoph-update-0.3.2.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.2.sql

Updating the Templates

Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory as there are additions to the language files. Also included in this release are the htmlized docs, in the php/docs/ directory, if you want them.

There are two new additions to config.inc.php: a VERSION variable and the DEFAULT_SHOW_ALL setting. The DEFAULT_SHOW_ALL setting makes all people or places shown by default when you visit the people or places pages. If you don't have hundreds of records this is probably more convenient than defaulting to 'a'. It is enabled by default.

That's it for this release, but I'll mention one bug fix for a problem a few users may have noticed: if you used zophImport to load images that were on a different filesystem than your images directory, everything would apparently work but the original images would not be copied. You might not have even noticed the images were missing unless you tried to view the full sized images in your browser. This release fixes this problem and makes sure other sorts of silent failure won't occur.

Zoph 0.3 -> 0.3.1 Upgrade

If you are upgrading from a version less than 0.3, please run the previous database updates first.

Updating the Database

Execute the statements in zoph-update-0.3.1.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.1.sql

None of the database changes should create incompatibility with version 0.3. You should update the database before updating the templates.

This database update attempts to delete some table accidentally included in zoph.sql in version 0.3. If you originally installed a prior version you probably do not have these tables and the update will fail when the "drop table" statements are reached. That isn't a problem, the other statements should have successfully executed first.

Updating the Templates

Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

There are no changes to config.inc.php this release so you can backup your version and then copy it over again.

Zoph 0.2.1 -> 0.3 Upgrade

If you are upgrading from Zoph 0.2, first update the database as described in the "Zoph 0.2 -> 0.2.1 Upgrade" section below. Updating the Database

Execute the statements in zoph-update-0.3.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.3.sql

None of the database changes should create incompatibility with version 0.2.1. You should update the database before updating the templates.

Updating the Templates

Copy over php/* to the location of your installation. Make sure to also copy the new php/lang and php/images subdirectories.

You may want to first backup your config.inc.php so you can copy your database settings over to the new config file.

Section 3 of the INSTALL file, "Configuring the PHP templates", has been updated to include information on the new config file settings.

The REQUIREMENTS document has info on what is need to use the new web importer.

The TUTORIAL has been updated to include information on using the web importer and viewing Zoph in other languages.

The db.inc.php template isn't needed anymore (and wasn't in the last release either, but it was accidentally included in the download). You can delete it if you like if it's still in your template directory.

If you are running PHP 4.2 and had to enable register_globals to get Zoph to work, with Zoph 0.3 this is no longer required. It is recommended that you disable register_globals in php.ini now. Also, to use the web importer you may need to increase the max_execution_time in php.ini to something more than the default of 30 seconds.

Configuration Changes

In versions of Zoph prior to 0.3, thumbnails were generated as the same file type as the original image (a jpeg image would have jpeg thumbnails, a gif image gif thumbnails, etc). As it may be desirable to instead have all thumbnails be the same type (there probably is no need, for example, to create uncompressed tiff thumbnails of tiff images), Zoph 0.3 allows you to specify that all thumbnails should be of the same type.

If all your images are the same type or if you don't mind having different sorts of thumbnails, you can skip this.

The default settings maintain compatibility with previous versions. If you would like to switch to a single thumbnail format, do the following:

In zophImport

In config.inc.php set MIXED_THUMBNAILS and THUMB_EXTENSION to the same values as zophImport.

If you make this change and have previously generated thumbnails with an extension different from THUMB_EXTENSION, you will need to regenerate the old thumbnails. A command like the following can take care of that (this one finds gifs and makes jpgs):

> find images/ -name "thumb_*.gif" -o -name "mid_*.gif" | perl -nle '$old = $_; s/\.(\w+)$/.jpg/; $cmd = "convert $old $_"; print $cmd; system($cmd);'

You can then get rid of the old thumbnails.

Preferences Changes

There are two new settings on the prefs page:

"Days past for recent photos links" sets the number of days used for the recently taken/modified links on the home page.

"Language" set the language to display. See the TUTORIAL for more info.

The PHP Importer

This version comes with a web based importer. If you are planning to use this feature you may need to install the following:

See the first section of the REQUIREMENTS doc for more info.

Zoph 0.2 -> 0.2.1 Upgrade

If you already have Zoph 0.2 installed, upgrading is fairly simple.

Updating the Database

Execute the statements in zoph-update-0.2.1.sql:

> mysql -u zoph_admin -p zoph < sql/zoph_update-0.2.1.sql

None of the database changes should create incompatibility with version 0.2. You should update the db before updating the templates.

Updating the Templates

Simply copy over php/* to the location of your installation. You may want to first backup your config.inc.php then copy it over.

If you do keep you previous config.inc.php, be aware of one addition to that file. Copy the lines defining the DEFAULT_USER from the new config.inc.php to your file.

If you plan on using the new default (guest) user feature, read "Defining a Default User" in the "Creating Users" section of the tutorial.