Install
Clone crater skeleton application repository
$ cd /var/www $ git clone git@github.com:crater-framework/crater-skeleton-application.git crater
The Crater Framework is on packagist https://packagist.org/packages/crater-php-framework/crater-php-framework
$ cd /var/www/crater $ php composer.phar self-update $ php composer.phar install
Set errorlog.html permission
$ cd /var/www/crater/App/Data $ sudo chmod 777 errorlog.html
Apache setup
To use Apache, setup a virtual host to point to the public/ directory of the project.
$ cd /etc/apache2/sites-available $ sudo vim crater.local
It should look something like below:
<VirtualHost *:80> ServerName crater.local DocumentRoot /var/www/crater/public <Directory /var/www/crater/public> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Enable site
$ sudo a2ensite crater.local $ sudo /etc/init.d/apache2 reload
Finally, you will need to add an entry in your hosts file corresponding to the value you place in your ServerName directive. On *nix-like systems, this is usually /etc/hosts; on Windows, you'll typically find it in C:\WINDOWS\system32\drivers\etc. Regardless of the system, the entry will look like the following:
127.0.0.1 crater.local
Checkpoint
At this point, you should be able to fire up your initial Crater PHP Framework application.
Point your browser to the server name you configured in the previous section;
you should be able to see a welcome page at this point.
The website can then be accessed using http://crater.localhost
Restart Apache.
If you’ve done it correctly, it should look something like this:
