After SemanticScuttle gets better and better, it's time to think about providing a installation/setup wizard for people that freshly install the bookmarking application.
The current steps to setup SemanticScuttle are:
- Download release from Sourceforge onto server
- Unzip
- Open URL in webbrowser
- Get error message: Please copy "config.php.dist" to "config.php" in data/ folder.
- Copy data/config.php.dist to data/config.php
- Adjust data/config.php to custom specifics, i.e. database settings
- Open URL in webbrowser
- If something does not work, adjust config file again
- Repeat
This is not easy for newbies and casual users that just want their own private boomarking site. It also makes it really easy to miss the dozens other configuration options that are not part of the config.php.dist file but are only declared in config.default.php. A better way for setup would be:
- Download release from Sourceforge onto server
- Unzip
- Open URL in webbrowser
- Wizard notices no config file exists and leads you through installation, asking for database credentials and allowing to configure further options.
This way of installing SemanticScuttle would make installation less error-prone and more pleasing.
Now instead of writing an installer yourself, there could be tools somewhere out in the web that already to this, right? Something like NSIS , IzPack or WiX , just for PHP web applications? Something like PEAR post-installation scripts, just not only for the command line?
There are some of them, but not a single one that I liked. To save you your own investigation, here is a list of them.
Desired feature set
Here is a list of features I would expect or wish to be in such a setup/configuration tool:
General features
- Automatically detect if the application has been setup.
- Preferably lives in/generates a single php setup script file. If not, it needs to live in an own directory.
Security
- lock installation tool to my IP address
- require creation of file to proceed with installation
- ask for install password that has been written in a non-webaccessible file on the server
- remove write rights from whole application directory after installation, if wished even from config file
- make installer unavailable after installation
Check and verify system requirements
- Minimum PHP version
- PHP extensions
- safe_mode
- Session availability
- File upload settings (file_uploads, upload_max_filesize) and post_max_size, perhaps generating .htaccess with correct settings automatically
- Checking a list of required PHP functions, i.e. exec (disable_functions)
- Script time limit (max_execution_time)
- Allowed RAM size (memory_limit)
- mod_rewrite
- PEAR packages
- Writability of directories and files, creating them if necessary (i.e. cache dirs)
Collecting configuration data
- Database settings
- Checking for connectivity
- Creating the database, possibly with a different user that has admin rights
- Importing an SQL dump from file
- Support for different database systems
- Setting directories i.e. for cache files
- Setting all kinds of other configuration options (select from array of options, true/false, integer with ranges, email addresses etc.)
- Defining default config values
- Titles and longer descriptions for config options
- Having mandatory and optional settings. Optional ones are skippable.
Interface
- Skinnable
- Wizard-based on multiple pages
- Command line (CLI) support, i.e. via ncurses or readline
- Translations
Existing tools
Tools I found out there on the web, in no particular order. The only actively developed one costs money, all others are or seem to be dead. The commercial one has no features the others don't have either. Plus, all of them do only database setup and file permissions - nothing else.
PHP Easy Installer
- http://www.apphp.com/php-easyinstaller/
- Shareware
- In development from 2006-2010
- Features:
- Database setup
- Table prefix
- Handles updates
- Creating of admin user/password
- Loading of SQL dump files
PHP2HEX
- http://www.phpclasses.org/browse/package/3072.html
- Requires phpclasses account to download
- Dead, last release 2006-05-10
- Features:
- Templates
- Password protection
- Create directories, files, permissions
- MySQL database setup, database creation, inserting data
- Running a custom script
NBBS Wizard
- http://www.phpclasses.org/browse/package/2543.html
- Requires phpclasses account to download
- GPL
- Dead, last release 2005-09-10
- Features:
- General wizard generator
- Create directories
- Database setup via PEAR DB
Application Installer Wizard Class
- http://www.vadimg.com/2009/06/24/application-installer-wizard-class/
- GPLv3
- Only 1 release on 2009-06-24, 1.0.0a - no updates to be expected
- Features:
- Database setup for MySQL only, database creation, no plain SQL files
- Multiple languages (english, hebrew)
PHP Web Application Installer
- http://github.com/SunboX/Php-Web-Application-Installer
- MIT License
- One release only 2009-06-20, first hack
- Features:
- Warnings and errors, but badly designed
- Database setup for MySQL only
- Does not even write config files
- German and english
Upcase
- http://sourceforge.net/projects/upcase-project/
- Dead, last release 2003-12-13
- Latest version 0.2.0, 4 releases in 9 months
- Features:
- User manual
ZZ/OSS Installer
- http://sourceforge.net/projects/zzossinstaller/
- Dead, last release 2004-04-07
- Latest version 1.0.0dev1, 3 releases over 6 months
PHPAppInstaller
- http://sourceforge.net/projects/phpappinstaller/
- Dead, last release 2005-12-02
- Only one release; version 0.5
pIap
- http://sourceforge.net/projects/piap/
- Dead, last release 2005-10-09
- Latest version 1.2, 5 releases over 2 weeks
- GPL
- french README