Forums / Cotonti / Development / Install & Update script in Siena

Usage, bugs, etc.

Trustmaster
#1 2010-02-07 01:22
Installer/updater script is included in Siena (trunk), so manual SQL script appliance is deprecated since now.

There is a note for developers how to organize their patches.

This topic exists to announce installer features and discuss possible problems.

The Installer is ran automatically when you first enter your site after unpacking into a new directory. The actual script path is http://yourhost.tld/install.php. The Installer features:
  • Checks if your host matches Cotonti requirements
  • Creates configuration file (if possible)
  • Chmods required directories
  • Installs SQL using existing MySQL user/database
  • Creates the first administrator's account
After installation is complete you can log in with the account it has created.

You won't be able to perform install on existing site until you remove datas/config.php (or set $cfg['new_install'] = true in it) and drop all the tables. Which you normally don't need to do.

The Updater should be run by you after you update to a new version. Developers should also run it after performing SVN Update if there are new files in setup folder. To perform an update, replace your files with the latest files from Siena branch and run http://yourhost.tld/install.php?m=update. The Updater is capable of:
  • Upgrading existing Genoa (0.6.3-0.6.7) installation to current Siena version
  • Updating from one Siena revision to a later SVN revision
  • Updating datas/config.php and adding new $cfg options
  • Applying all necessary SQL and PHP patches

It is not recommended to apply SQL patches manually. If an installer/updater breaks with an error, you should ask for help quoting the error output. If you are experience in applying patches manually, then don't forget to use this query for synchronizing the updater with your current revision:
UPDATER `sed_updates` SET upd_value = '$Rev: 1234 $' WHERE upd_param = 'revision';
Here 1234 stands for revision number you have manually updated to.
May the Source be with you!