Zoph 0.9 to 0.9.1
edit- You can use these instructions as well to upgrade from v0.8.4 or 0.9pre1 or 0.9pre2
- If you want to upgrade from an older version, first follow the instructions to upgrade to 0.9. It is not necessary to install older versions first, you can just install the current version and follow the upgrade instructions below.
Copy files
editCopy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
Database changes
editExecute zoph-update-0.10.sql:
mysql -u zoph_admin -p zoph < sql/zoph_update-0.10.sql
Change zoph into zophutf8 if you are working on the temporary database.
Changes this script makes:
- Adding a database table to store configuration
- Removing a field from preferences table for a removed preference
- Removing the rating field from the photos table
- Adding a view on the photos and rating table to get the average rating
- Adding an index on the rating table
Migrating the configuration
editAs of Zoph 0.9.1, configuration is mainly controlled from the GUI and no longer from config.inc.php. This means that you either must migrate your configuration or make all configuration changes by hand.
- Log in to your Zoph installation with an admin user
- You may get some errors about because Zoph cannot find your photos in the default location, don't worry, we'll fix that next.
- Copy migrate_config.php from the contrib directory into your Zoph directory
- In your browser, replace zoph.php with migrate_config.php
- Zoph will try to migrate your config to the new, database-based configuration.
- Delete migrate_config.php
- There are a few configuration-items left in config.inc.php, in most cases you'll want to leave those on default, so instead of manually removing all the no longer existing configuration-items, you may as well just overwrite your config file with the one included with Zoph.
Removed Configuration options
editSince the configuration is now controlled from the Web GUI, most of the configuration options are now deprecated:
- ZOPH_TITLE
- MAX_CRUMBS
- MAX_DAYS_PAST
- ZOPH_URL
- ZOPH_SECURE_URL
- DEFAULT_TABLE_WIDTH
- CSS_SHEET
- ICONSET
- LANG_DIR
- DEFAULT_LANG
- DEFAULT_ORDER
- DEFAULT_DIRECTION
- $VALIDATOR
- FORCE_SSL
- FORCE_SSL_LOGIN
- THUMB_SIZE
- MID_SIZE
- THUMB_PREFIX
- MID_PREFIX
- MIXED_THUMBNAILS
- THUMB_EXTENSION
- ALLOW_ROTATIONS
- ROTATE_CMD
- BACKUP_ORIGINAL
- BACKUP_PREFIX
- IMAGE_DIR
- CLI_USER
- IMPORT
- UPLOAD
- IMPORT_DIR
- IMPORT_PARALLEL
- MAGIC_FILE
- TAR_CMD
- UNZIP_CMD
- UNGZ_CMD
- UNBZ_CMD
- MAX_UPLOAD
- USE_DATED_DIRS
- HIER_DATED_DIRS
- DIR_MODE
- FILE_MODE
- JAVASCRIPT
- EMAIL_PHOTOS
- WATERMARKING
- WATERMARK
- WM_POSX
- WM_POSY
- WM_TRANS
- ALLOW_COMMENTS
- AUTOCOMPLETE
- DOWNLOAD
- MAPS
- GOOGLE_KEY
- CAMERA_TZ
- DATE_FORMAT
- TIME_FORMAT
- GUESS_TZ
- SHARE
- SHARE_SALT_FULL
- SHARE_SALT_MID
Configuration options in config.inc.php
editThere are only a few options left that can be set in config.inc.php. Normally you will not need to change them:
- VERSION
- Controls the version displayed in Zoph's GUI, only change this if you're a Zoph developer.
- RELEASEDATE
- Controls the release date displayed in Zoph's GUI, only change this if you're a Zoph developer.
- INI_FILE
- Location of zoph.ini
- THUMB_SIZE
- Size of thumbnail files (you shouldn't change this)
- MID_SIZE
- Size of mid size files (you shouldn't change this)
- THUMB_PREFIX
- Size of thumbnail files (you shouldn't change this)
- MID_PREFIX
- Size of mid size files (you shouldn't change this)
- LOG_ALWAYS
- Control debugging level
- LOG_SEVERITY
- Control debugging level
- LOG_SUBJECT
- Control debugging level
Zoph 0.9 to 0.9.0.1
edit- You can use these instructions as well to upgrade from v0.8.4 or 0.9pre1 or 0.9pre2
- If you want to upgrade from an older version, first follow the instructions to upgrade to 0.9. It is not necessary to install older versions first, you can just install the current version and follow the upgrade instructions below.
Upgrading from v0.9 to v0.9.0.1 consists of simply copying the files in place, no database upgrades are needed:
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
No changes have been made to the CLI tool or man pages, so it's not needed to update them.
Zoph 0.9pre1/2 to 0.9
editUpgrading from v0.9pre1 or v0.9pre2 to v0.9pre2 or v0.9 consists of simply copying the files in place, no database upgrades are needed:
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
No changes have been made to the CLI tool or man pages, so it's not needed to update them.
Zoph 0.8 to 0.9
edit- If you want to upgrade from a version older then 0.8, first follow the instructions to upgrade to 0.8. It is not necessary to install older versions first, you can just install the current version and follow the upgrade instructions below.
- If you want to upgrade from 0.8.4, you just need to copy the files, no database changes are needed
- You can also follow these instructions to go to 0.9preX
- You can also follow these instruction if you are on one of the maintenance releases of 0.8 (0.8.0.x)
- If you are on one of the feature releases for 0.8 (0.8.x), except 0.8.4, you will need to edit zoph_update-0.9.sql to comment any changes you have already made on your system.
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
Copy cli/zoph into /bin (or another directory in your $PATH).
cp cli/zoph /bin
Copy zoph.1.gz into your man 1 directory (usually /usr/share/man/man1) and zoph.ini.5.gz into man 5 (usually /usr/share/man/man5).
cp cli/zoph.1.gz /usr/share/man/man1 cp cli/zoph.ini.5.gz /usr/share/man/man5
Database changes
editDon't forget to edit the sql script if you are running on 0.8.x.
Zoph 0.9 requires a manual upgrade to the database, this is described in Changing your database to UTF-8. If you are on 0.8.1 or later, you should already have made this change.
Execute zoph-update-0.9.sql:
mysql -u zoph_admin -p zoph < sql/zoph_update-0.9.sql
Change zoph into zophutf8 if you are working on the temporary database.
Changes this script makes:
- Remove the people_slots setting from the user preferences table (0.8.4)
- Add a hash to the photos table (0.8.4)
- Add a setting to control whether or not the user is allowed to use the sharing feature in the users table (0.8.4)
- Added tables and preferences for geotagging support (0.8.3).
- Make the language field in the prefs table longer so languages like en-ca can be stored (0.8.1)
Configuration updates
editIn Zoph 0.8.2, .zophrc and a part of config.inc.php were replaced by zoph.ini. You can use zoph.ini.example in the cli dir as an example. (see Zoph/Configuration for details):
New options
edit- LOG_ALWAYS
- Control how much debug information is shown for all subjects. (0.8.1)
- LOG SEVERITY
- Configure how much debug information is shown, for the subjects defined in LOG_SUBJECT (0.8.1)
- LOG_SUBJECT
- Configure on which subject you would like to see logging. 0.8.1)
- CLI_USER
- User id that the CLI client uses to connect to Zoph. Must be admin. Change this into '0' to let Zoph lookup the user from the Unix user that is running Zoph. (0.8.2)
- IMPORT
- Enable ('1') or disable ('0') webimport (0.8.2)
- UPLOAD
- Enable ('1') or disable ('0') uploading photos through the browser (0.8.2)
- IMPORT_DIR
- Directory, relative to IMAGE_DIR, that will store uploaded photos until they have been imported in Zoph. (0.8.2)
- IMPORT_PARALLEL
- Number of photos to resize concurrently. (0.8.2)
- MAGIC_FILE
- MIME Magic file. Zoph needs this to determine the file type of an imported file. (0.8.2)
- FILE_MODE
- File permissions for files imported in Zoph. (0.8.2)
- UNGZ_CMD
- Command to be used to decompress .gz files. (0.8.2)
- UNBZ_CMD
- Command to be used to decompress .bzip files. (0.8.2)
- SHARE
- Enable the possibility to share a photo by using a URL that can be used without logging in to Zoph. Once enabled, you can determine per user whether or not this user is allowed to see these URLs. (0.8.4)
- SHARE_SALT_FULL
- When using the SHARE feature, Zoph uses a hash to identify a photo. Because you do not want people who have access to you full size photos (via Zoph or otherwise) to be able to generate these hashes, you should give Zoph a secret salt so only authorized users of your Zoph installation can generate them. This one is used for fullsize photos (0.8.4)
- SHARE_SALT_FULL
- When using the SHARE feature, Zoph uses a hash to identify a photo. Because you do not want people who have access to you full size photos (via Zoph or otherwise) to be able to generate these hashes, you should give Zoph a secret salt so only authorized users of your Zoph installation can generate them. This one is used for midsize photos (0.8.4)
Removed options
editThe following configuration options no longer exist, you should remove them from you config.inc.php:
- DB_HOST
- Moved to zoph.ini (0.8.2)
- DB_NAME
- Moved to zoph.ini (0.8.2)
- DB_USER
- Moved to zoph.ini (0.8.2)
- DB_PASS
- Moved to zoph.ini (0.8.2)
- CLIENT_WEB_IMPORT
- Replaced by UPLOAD (0.8.2)
- SERVER_WEB_IMPORT
- Replaced by IMPORT (0.8.2)
- DEFAULT_DESTINATION_PATH
- Due to introduction of IMPORT_DIR no longer necessary (0.8.2)
- SHOW_DESTINATION_PATH
- Due to introduction of IMPORT_DIR no longer necessary (0.8.2)
- REMOVE_ARCHIVE
- As of Zoph 0.8.2, Zoph always removes an archive after a successful decompress (0.8.2)
- IMPORT_MOVE
- Due to introduction of IMPORT_DIR, Zoph always moves files (0.8.2)
- IMPORT_UMASK
- Replaced by FILE_MODE (0.8.2)
- USE_IMAGE_SERVICE
- The Image Service is now always on. If you were previously using define('USE_IMAGE_SERVICE', 0), you should move your images out of your webroot, and update IMAGE_DIR accordingly. (0.8.4)
- WEB_IMAGE_DIR
- This was only needed when USE_IMAGE_SERVICE was enabled. (0.8.4)
- MAX_PEOPLE_SLOTS
- The people slots feature, that allowed multiple 'add people' dropdowns on the edit photo and bulk edit photo pages has been replaced by a Javascript that automatically adds a new dropdown whenever a new person is added, allowing a virtually unlimited amount of people to be added in one edit. (0.8.4)
Zoph 0.8.3 to 0.8.4
edit- If you want to upgrade from 0.8.2, first follow the upgrade instructions from 0.8.2 to 0.8.3
- If you want to upgrade from an older version, such as 0.8 or 0.8.0.x, first follow the upgrade instructions from 0.8 to 0.8.1, then the upgrade instructions from 0.8.1 to 0.8.2, then upgrade instructions from 0.8.2 to 0.8.3 and finally these instructions.
- If you're upgrading from an older version, it is not necessary to install the "in between" versions first, you can just install the current version and follow the upgrade instructions below.
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
Database changes
editBecause 0.8.4 is a version "in between" 0.8 and 0.9, you will need to edit the update script. You should comment out the changes that have already been applied to your system. Prepend the changes for 0.8.1 and/or 0.8.3 with a "#". There were no database changes in 0.8.2. Execute zoph-update-0.9.sql:
mysql -u zoph_admin -p zoph < sql/zoph_update-0.9.sql
Changes this script makes:
- Remove the people_slots setting from the user preferences table
- Add a hash to the photos table
- Add a setting to control whether or not the user is allowed to use the sharing feature in the users table
Configuration changes
edit(see Zoph/Configuration for details):
New options
edit- SHARE
- Enable the possibility to share a photo by using a URL that can be used without logging in to Zoph. Once enabled, you can determine per user whether or not this user is allowed to see these URLs. (0.8.4)
- SHARE_SALT_FULL
- When using the SHARE feature, Zoph uses a hash to identify a photo. Because you do not want people who have access to you full size photos (via Zoph or otherwise) to be able to generate these hashes, you should give Zoph a secret salt so only authorized users of your Zoph installation can generate them. This one is used for fullsize photos (0.8.4)
- SHARE_SALT_FULL
- When using the SHARE feature, Zoph uses a hash to identify a photo. Because you do not want people who have access to you full size photos (via Zoph or otherwise) to be able to generate these hashes, you should give Zoph a secret salt so only authorized users of your Zoph installation can generate them. This one is used for midsize photos (0.8.4)
Removed options
edit- USE_IMAGE_SERVICE
- The Image Service is now always on. If you were previously using define('USE_IMAGE_SERVICE', 0), you should move your images out of your webroot, and update IMAGE_DIR accordingly. (0.8.4)
- WEB_IMAGE_DIR
- This was only needed when USE_IMAGE_SERVICE was enabled. (0.8.4)
- MAX_PEOPLE_SLOTS
- The people slots feature, that allowed multiple 'add people' dropdowns on the edit photo and bulk edit photo pages has been replaced by a Javascript that automatically adds a new dropdown whenever a new person is added, allowing a virtually unlimited amount of people to be added in one edit. (0.8.4)
Changed options
edit- MAGIC_FILE
- Zoph would give an error when MAGIC_FILE was empty in Zoph 0.8.2 and 0.8.3 (it didn't exist in 0.8.1 and before). As of 0.8.4, the default and recommended value is empty, letting PHP use the built-in Magic file. Only if that does not work, you can set an alternative Magic file, according to your distribution's standards. (0.8.4)
Zoph 0.8.2 to 0.8.3
edit- You can use these instructions to go from 0.8.2.1 to 0.8.3
- If you want to upgrade from 0.8.1, first follow the upgrade instructions from 0.8.1 to 0.8.2
- If you want to upgrade from an older version, such as 0.8 or 0.8.0.x, first follow the upgrade instructions from 0.8 to 0.8.1, then the upgrade instructions from 0.8.1 to 0.8.2 and finally these instructions.
- If you're upgrading from an older version, it is not necessary to install the "in between" versions first, you can just install the current version and follow the upgrade instructions below.
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
Database changes
editBecause 0.8.3 is a version "in between" 0.8 and 0.9, you will need to edit the update script. You should comment out the changes that have already been applied to your system. Prepend the changes for 0.8.1 with a "#". There were no database changes in 0.8.2. Execute zoph-update-0.9.sql:
mysql -u zoph_admin -p zoph < sql/zoph_update-0.9.sql
Zoph 0.8.2 to 0.8.2.1
editCopy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
You can upgrade directly from 0.8 or 0.8.1 to 0.8.2.1, simply use the zoph-0.8.2.1.tar.gz and execute the instructions for the 0.8 to 0.8.1 and 0.8.1 to 0.8.2 upgrade.
Zoph 0.8.1 to 0.8.2
edit- You can use these instructions to go from 0.8.1.x to 0.8.2
- If you want to upgrade from 0.8 or 0.8.0.x, first follow the upgrade instructions from 0.8 to 0.8.1
As of 0.8.1, the bin and man directories in the Zoph tarball have been replaced by the cli directory. Also, zophExport.pl no longer exists and zophImport.pl has been replaced by zoph. If you had them installed, you should remove them from your system, they are no longer supported. Don't forget to remove the manpages (zophImport.pl.1.gz and zophExport.pl.1.gz) as well, they will usually be in /usr/share/man/man1.
Copy the contents of the php directory into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
cp config.inc.php config.local.php cp -a php/* /var/www/html/zoph cp -a lang /var/www/html/zoph
Copy cli/zoph into /bin (or another directory in your $PATH).
cp cli/zoph /bin
Copy zoph.1.gz into your man 1 directory (usually /usr/share/man/man1) and zoph.ini.5.gz into man 5 (usually /usr/share/man/man5).
cp cli/zoph.1.gz /usr/share/man/man1 cp cli/zoph.ini.5.gz /usr/share/man/man5
Configuration changes
editThe most important configuration change is the replacement of .zophrc and a part of config.inc.php by zoph.ini. You can use zoph.ini.example in the cli dir as an example.
(see Zoph/Configuration for details):
Removed options
editThe following configuration options no longer exist, you should remove them from you config.inc.php:
- DB_HOST
- Moved to zoph.ini (0.8.2)
- DB_NAME
- Moved to zoph.ini (0.8.2)
- DB_USER
- Moved to zoph.ini (0.8.2)
- DB_PASS
- Moved to zoph.ini (0.8.2)
- CLIENT_WEB_IMPORT
- Replaced by UPLOAD (0.8.2)
- SERVER_WEB_IMPORT
- Replaced by IMPORT (0.8.2)
- DEFAULT_DESTINATION_PATH
- Due to introduction of IMPORT_DIR no longer necessary (0.8.2)
- SHOW_DESTINATION_PATH
- Due to introduction of IMPORT_DIR no longer necessary (0.8.2)
- REMOVE_ARCHIVE
- As of Zoph 0.8.2, Zoph always removes an archive after a successful decompress (0.8.2)
- IMPORT_MOVE
- Due to introduction of IMPORT_DIR, Zoph always moves files (0.8.2)
- IMPORT_UMASK
- Replaced by FILE_MODE (0.8.2)
New options
edit- CLI_USER
- User id that the CLI client uses to connect to Zoph. Must be admin. Change this into '0' to let Zoph lookup the user from the Unix user that is running Zoph. (0.8.2)
- IMPORT
- Enable ('1') or disable ('0') webimport
- UPLOAD
- Enable ('1') or disable ('0') uploading photos through the browser
- IMPORT_DIR
- Directory, relative to IMAGE_DIR, that will store uploaded photos until they have been imported in Zoph.
- IMPORT_PARALLEL
- Number of photos to resize concurrently.
- MAGIC_FILE
- MIME Magic file. Zoph needs this to determine the file type of an imported file.
- FILE_MODE
- File permissions for files imported in Zoph.
- UNGZ_CMD
- Command to be used to decompress .gz files.
- UNBZ_CMD
- Command to be used to decompress .bzip files.
Database changes
editNo database changed need to be made for Zoph 0.8.2
Zoph 0.8.1 to 0.8.1.x
edit- You can use these instructions to go from 0.8.1 to 0.8.1.2
- You can also use these instructions to go from 0.8.1.1 to 0.8.1.2
Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
You can upgrade directly from 0.8 to 0.8.1.2, simply use the zoph-0.8.1.2.tar.gz and execute the instructions for the 0.8 to 0.8.1 upgrade.
Zoph 0.8 to 0.8.0.x
edit- You can also use these instructions to go from 0.8.0.1 to 0.8.0.2, 0.8.0.3 or 0.8.0.4
Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
You can upgrade directly from 0.7 to 0.8.0.x, simply use the zoph-0.8.0.x.tar.gz and execute the instructions for the 0.7 to 0.8 upgrade.
Zoph 0.8 to 0.8.1
edit- Follow the upgrade instructions to 0.8 first if you are using an older version. (no need to really download and install v0.8, just execute the upgrade instructions).
Copy php/* to the location of your installation. Make sure that you also copy the js and img subdirectories. If you use the translations in Zoph, make sure to also copy the lang directory.
You can upgrade directly from 0.8 to 0.8.1.x, simply use the zoph-0.8.1.x.tar.gz and execute the instructions for the 0.8 to 0.8.1 upgrade.
Updating the database
editZoph 0.8.1 requires a manual upgrade to the database, this is described in Changing your database to UTF-8.
Execute zoph-update-0.9.sql:
mysql -u zoph_admin -p zoph < sql/zoph_update-0.9.sql
Change zoph into zophutf8 if you are working on the temporary database.
The database upgrade script makes the following changes:
- Make the language field in the prefs table longer so languages like en-ca can be stored (0.8.1)
Configuration updates
edit(see Zoph/Configuration for details):
New options
edit- LOG_ALWAYS (0.8.1)
- LOG SEVERITY (0.8.1)
- LOG_SUBJECT (0.8.1)
Zoph 0.7 to 0.8
edit- You can also use these instructions to go from 0.7.0.x to 0.8
- For an update from 0.7.1, 0.7.2, 0.7.2.1, 0.7.3 or 0.7.4 see 0.7.x to 0.8
- For an update from 0.7.5 or 0.8pre1 - 3, see Zoph 0.7.5 or 0.8 pre-release to 0.8
Copy php/* to the location of your installation. Make sure that you also copy the js and img subdirectories. If you use the translations in Zoph, make sure to also copy the lang directory.
Copy bin/zophImport.pl into the directory where you installed it, if you followed the installation instructions it is probably /usr/local/bin, otherwise, find out with which zophImport.pl.
Updating the Database
editIf 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:
- Add the 'sortname' column to the albums and categories tables (0.7.1)
- Add preferences field to let users define the sort order (0.7.1)
- Add a column to the users table that defines whether or not this user is allowed to download photos. (0.7.1)
- Create tables zoph_pages, zoph_pageset and zoph_pages_pageset (0.72)
- Add a 'pageset' field to zoph_albums, zoph_categories, zoph_places and zoph_people columns (0.7.2).
- Add columns to the places and photos table to store the geographic location of that photo or place (0.7.3)
- Add column to the places table to store timezone information (0.7.3)
- Add column to the photos table to store time correction information (0.7.3)
- Change the description column in the photos table from BLOB to TEXT, to improve search-capabilities (0.7.3)
- Change the title field for albums and categories from 32 to 64 characters (0.7.3)
- Add new tables for usergroups (0.7.4)
- Modify the zoph_ratings table to allow multiple votes by the same user, store IP address and date/time (0.7.5)
- Add an index on users to the zoph_ratings table (0.7.5)
- Modify the zoph_users table to control whether a user is allowed to use the voting system and whether a user is allowed to vote multiple times on the same photo (0.7.5)
- Create a table to store saved searches (0.7.5)
Configuration updates
edit(see Zoph/Configuration for details):
New options
edit- MAPS (0.7.3)
- GOOGLE_KEY (0.7.3)
- CAMERA_TZ (0.7.3)
- DATE_FORMAT (0.7.3)
- TIME_FORMAT (0.7.3)
- GUESS_TZ (0.7.3)
- ICONSET (0.7.2)
- DEFAULT_LANG (0.7.2)
- WM_POSX (0.7.1)
- WM_POSY (0.7.1)
- WM_TRANS (0.7.1)
- IMPORT_MOVE (0.7.1)
- DOWNLOAD (0.7.1)
Group access rights
editAs of Zoph 0.7.4, you have to make your users members of a group and then assign viewing rights for albums to the group, instead of to the users directly. After the update to 0.7.4, you will have no groups and therefore your users will not be allowed to see any photos, you should create one or more groups, make your user member of one or more of them and assign viewing rights to the groups. If you'd rather stay with your current per-user viewing rights, you can use the user_to_group.php script in the contrib directory: this will create a new group for each user and assign the currently defined access rights for each user the newly created groups. To use this script:
- Make a backup of your current Zoph database;
- Copy the users_to_group.php script into your Zoph php directory;
- Log in to Zoph with an admin user;
- Did I mention making a backup?
- Change the part after the last / in your browser into user_to_group.php;
After this, you can remove the zoph_album_permissions table in Zoph, as it is no longer used.
Zoph 0.7.x to 0.8 update
edit- Except 0.7.5, see Zoph 0.7.5 or 0.8 pre-release to 0.8
If you have previously upgraded to a feature release (0.7.1, 0.7.2, 0.7.3 or 0.7.4), 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.8, 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.8
Zoph 0.7.5 or 0.8 pre-release to 0.8
editIf you are upgrading from 0.7.5 or a 0.8 pre-release to 0.8, you don't need to run any database scripts, there are no database changes in this upgrade.
Follow the instructions for 0.7 to 0.8, but skip the database upgrades.
Zoph 0.7 to Zoph 0.7.0.x
editCopy 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.x, simply use the zoph-0.7.0.x.tar.gz and execute the instructions for the 0.6 to 0.7 upgrade.
Zoph 0.6 -> 0.7 update
editCopy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
Updating the Database
editIf 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:
- Adds preference fields for "show all exif", autocomplete, view and autothumb features
- Adds coverphoto field to albums, categories, places and people.
Configuration updates
edit(see Zoph/Configuration for details):
New options
editPerl script changes
editAs of v0.7, you can set some defaults for zophImport.pl from .zophrc. The example file zophrc.sample has been updated with these settings:
$datedDirs = 0; $copy = 0; $hierarchical = 0; $verbose = 0; $resolveSymlinks = 0;
zophImport.pl now has an option to resolve symlinks during import. For more details, see Using the commandline tools
Zoph 0.5.x -> 0.6 update
editCopy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
Updating the Database
editIf 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:
- Add sortorder fields to albums and categories
- Add url + description fields to places
- Make changes needed for user comments:
- Add table for comments
- Add table to link comments to a photo
- Add a field to a user to indicate whether or not this user can make comments
- Add a table to create relations between photos
- Change the rating field length, because it couldn't hold a 10 and was truncated to 0 decimals in a previous version.
Configuration updates
edit(see Zoph/Configuration for details):
New options
edit- ALLOW_COMMENTS
- MAX_UPLOAD (was hardcoded to 10MB in 0.5.1 and before)
Changed options
edit- USE_IMAGE_SERVICE is now on by default
- DEFAULT_TABLE_WIDTH again has support forĀ % (this was accidently removed in 0.5), please note that it is now required to specify the entity ("px" or "%").
Perl script changes
editAs of v0.6, no settings need to be made in zophImport.pl and zophExport.pl, 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
editCopy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory. No database changes are needed for this release.
Zoph 0.4 -> 0.5 Upgrade
editCopy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
Updating the Database
editIf 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:
- Change the password length to 64 bytes. Needed for Mysql 4.1 compatibility.
- Changes to the places table for hierarchical locations:
- add the parent_place_id column.
- copy the location that currently has place_id 1 to a new place_id.
- Update all the photos taken at that location
- Change place_id 1 to "World" (You may want to change that)
- And finally makes all the other places a child of "World".
- Add a column to the prefs table for opening fullsize photos in a new Window
- Add a column to the album_permissions table for the watermarking feature
Configuration updates
editA few new configuration options have been added in Zoph 0.5.
Forcing SSL
editYou 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 adapting 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
editYou can now have Zoph add a watermark to the high resolution images, to prevent unauthorized use of your photos. The watermark is a partly transparent 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
editA 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
editYou 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 individually 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
editCopy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.
Updating the Database
editIf 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:
- Changes the name of all the tables to zoph_<old name>. If you do not want this, comment out the lines starting with "rename table". Make sure the variable DB_PREFIX in config.inc.php and $db_prefix in zophImport and zophExport match your choice.
- Adds a few columns to zoph_album_permissions and zoph_users, to be able to monitor such as changes to permissions and last login.
- Adds "email" to people.
- Makes modifications for the new rating system, where multiple ratings can be done on a single photo and average is calculated automatically.
Updating configuration
editA 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.pl and zophExport.pl 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 its 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
editIf you are upgrading from a version previous to 0.3.2, please run the older database updates first.
Updating the Database
editThis 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
editCopy 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
editYou'll find a new perl script in this release, bin/zophExport.pl, 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
editIf you are upgrading from a version previous to 0.3.1, please run the older database updates first.
Updating the Database
editThe 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
editCopy 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.pl 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
editIf you are upgrading from a version less than 0.3, please run the previous database updates first.
Updating the Database
editExecute 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
editCopy 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
editIf 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
editCopy 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
editIn 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.pl
- set $mixed_thumbnails to 1
- set $thumb_extension to whatever you like (jpg, for example)
In config.inc.php set MIXED_THUMBNAILS and THUMB_EXTENSION to the same values as zophImport.pl.
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
editThere 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
editThis version comes with a web based importer. If you are planning to use this feature you may need to install the following:
- GD 2.0
- PHP 4.2
See the first section of the REQUIREMENTS doc for more info.
Zoph 0.2 -> 0.2.1 Upgrade
editIf you already have Zoph 0.2 installed, upgrading is fairly simple.
Updating the Database
editExecute 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
editSimply 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.