PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

First work on the Generic PHP Application Installer

Note: This article was originally published at Planet PHP on 26 September 2010.
Planet PHP

Half a year after I collected requirements for a generic PHP application installer , Kore already implemented the first bits of it for the Arbit installer, which is supposed to be generic enough for other PHP applications, too. He also held a talk at the PHP Unconference in Hamburg, collecting more requirements for it.

There is already some code in arbit's svn repository which at least generates a .phar file that checks your application requirements and collects configuration options:

$ svn co svn://arbitracker.org/arbit/projects/installer/trunk ai-trunk ... $ cd ai-trunk $ emacs buildArbitInstaller now you should replace the directory which is used as source directory: - new RecursiveDirectoryIterator('/home/kore/devel/twircd/src'), + new RecursiveDirectoryIterator(dirname(__FILE__) . '/src/'), $ ./buildArbitInstaller $ ls arbit-0.3-alpha-installer.phar ...

Now you do already have a .phar file that can be put on a web server, and on requesting it from your browser, you will see the web interface of the installer:

Note that you need to associate .phar files in your web server with the PHP interpreter. Example for apache:

cat /etc/apache2/mods-enabled/php5.conf |head -n3 SetHandler application/x-httpd-php

Here I added ar| to get .phar files running.

Apart from checking requirements and collecting the data, the installer does not yet do anything else. Installing files, creating database tables and so is still missing, as well as the CLI interface. Nontheless a good start .