bolt/bolt — pull request #575 by ciarand (2013-09-12 04:32:03+00:00)
Title: The PHP 5.4+ CLI server is incompatible with Bolt

PHP v5.4 brings the builtin web server, available from a simple flag to the PHP binary.
```bash
php -S localhost:4000 index.php
```
While the server is not for use outside of a development environment, it's significantly easier to setup than, say, Apache or Nginx – even for advanced system administrators.

Unfortunately, due to the way Bolt is configured it's incompatible with this server. This is partly due to the way the cli-server handles static assets in an entry-script app, and also partly due to some relative pathing issues throughout Bolt's codebase.

Luckily a fix can be fairly easily implemented for **only** the cli-server by checking `php_sapi_name()` against the "cli-server" string.

Further reading:
- [Silex documentation on PHP 5.4's web server][1]
- [PHP 5.4 release notes][2]

[1]: http://silex.sensiolabs.org/doc/web_servers.html#php-5-4
[2]: http://php.net/releases/5_4_0.php

I'll change this to a PR soon.