PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

on PHP's webserver

Note: This article was originally published at Planet PHP on 3 March 2011.
Planet PHP

There are a lot of talks today about aoBuilt-in web servera [for PHP] RFC by Moriyoshi Koizumi. There is a nice discussion on Hacker News (and 2 threads on reddit: here and here). So, here's couple of cents from me.

1. That is a great addition to the standard PHP tool-set. I remember days, when I had to configure web-servers to run my web-projects and it was ridiculously distracting. It's not aorocket sciencea, but still complicates matters a lot. Finally, developers would be able to forget about these monstrous WAMP/XAMPP/whatever packages and just run their applications using aophp -S localhost:8080a.

2. Dear developers, please, do not expect this to handle production load. This web-server is solely for localhost developer needs. It is a single-process, single-threaded, blocking http-server.

3. If you're looking for the solution, which is similar Ruby's Rack or Python's WSGI this is not it. But AiP (formerly aoAppServer in PHPao) is: it lets your application pre-initialize classes (and keep them in memory between requests), pre-open database connections, pre-warm caches, etc. and serve application with a fast multi-processed server (you can choose from HTTP, SCGI and AMQ/Mongrel2 protocols). And it is still as easy to start bundled http-server: aoaip app path/to/applicationa

Various versions of AiP are used in production on several large projects and show nice results (it is stable and really fast). And we're planning to release next major version really soon now. If that sounds interesting, join our Google Groups"discussion group and watch the project on github