News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Thijssen's Blog:
php 5.4 + htrouter Your personal Apache 2.2 compatible server
December 23, 2011 @ 08:27:10

Joshua Thijssen has a new post to his blog today about a feature of the upcoming PHP 5.4 release, the built-in web server, and a handy way to reproduce .htaccess functionality with the help of a simple PHP script - htrouter.

The problem with the new PHP 5.4 internal web-server is that it isn't Apache. Thus it does not know anything about .htaccess. Even when you have defined your .htaccess to do authentication, the internal PHP web-server will ignore it, while in production, the authentication will be needed (if you will be running Apache, of course). Also, you need to reroute everything manually through your app_dev.php, so your URL's don't really match the way they will be on your production.

He introduces the PHP web server quickly, just showing a sample command line call to start it up and to point it at a certain PHP file as a "boostrap". With the help of his htrouter script, though, you can use "modules" similar to those in Apache. He already has the HTTP auth stuff working and more is to come.

0 comments voice your opinion now!
htrouter apache tool webserver feature


blog comments powered by Disqus

Similar Posts

O'Reilly Broadcast: Getting Drupal and mod_security to Play Nicely Together on Red Hat 5.x Servers

Dries Buytaert\'s Blog: Drupal webserver configurations compared

Gregory Szorc's Blog: So Many Untapped PHP Features

HotToForge.com: Installing Cherokee With PHP5 And MySQL Support On Ubuntu 9.10

PHPBuilder.com: A Sanity-saving Debugging Solution for Your PHP Development


Community Events





Don't see your event here?
Let us know!


series symfony list threedevsandamaybe introduction tips release language conference framework deployment api zendserver laravel community podcast voicesoftheelephpant interview code bugfix

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework