News for hackers. Stuff that matters.
Re:A Built-in Web Server For PHP by al_james on Wednesday March 02, 2011 @06:21PM (#2281890)
I don't really see how this would help. Thats what FastCGI is for. You would have to be dumb to expose a php internal HTTP server to the world, and configuring a FastCGI backend is no harder than setting up a HTTP backend in apache/nigix/whatever. If its just for testing, most apache installs come with PHP by default, its just another command to learn.
Re:A Built-in Web Server For PHP by Toucan on Wednesday March 02, 2011 @06:33PM (#2281936)
The idea isn't to open the server to the world. The RFC states that it's meant to be used in a similar way to django's manage.py runserver, for development and internal testing.

Django phrase it in their tutorial as:

"We've included this with Django so you can develop things rapidly, without having to deal with configuring a production server -- such as Apache -- until you're ready for production.

Now's a good time to note: DON'T use this server in anything resembling a production environment. It's intended only for use while developing. (We're in the business of making Web frameworks, not Web servers.)"

As long as the PHP documentation includes similar caveats and guidance, an HTTP server isn't a bad thing.

Re:A Built-in Web Server For PHP by Legion on Wednesday March 02, 2011 @06:39PM (#2281958)
Yeah, the first thing I thought of when reading this was Ruby's WEBrick and how it's used in Rails to provide an out-of-the-box local development server.

Don't see how that would be a bad thing. Something simpler and quicker than installing XAMPP or configuring the webserver that comes with your OS/distro.

Re:A Built-in Web Server For PHP by 3dFlatLander on Wednesday March 02, 2011 @06:30PM (#2281919)
It's even easier now that PHP 5.3.3+ has FPM included (config option is --enable-fpm). Getting it set up with nginix is a breeze.
Re:A Built-in Web Server For PHP by X-Istence on Thursday March 03, 2011 @01:00AM (#2283019)
PHP FPM is nice and all, but the issue still is that it is a FastCGI server, so you need something that can route to it. This php -S proposal doesn't have that requirement.
Re:A Built-in Web Server For PHP by ary on Wednesday March 02, 2011 @06:27PM (#2281913)
That's not exactly true. You still need an HTTP server to proxy to the FastCGI back-end. This could be useful for a number of things outside of local development instances. One could avoid having to setup Apache/nginx/whatever to pick up the HTTP request from a reverse proxy and instead just spin up PHP on its own.
Re:A Built-in Web Server For PHP by abredow on Wednesday March 02, 2011 @06:34PM (#2281939)
Seems like the built in server would be most useful for newbies to get an application running. Think if how much easier it is to get a basic Rails app running to start learning compared to configuring Apache and PHP together.
Re:A Built-in Web Server For PHP by al_james on Wednesday March 02, 2011 @07:02PM (#2282041)
Normally you just install apache and php and they just work. Macs come with both pre-installed as do most linux distros. Don't see whats so hard!
Re:A Built-in Web Server For PHP by abredow on Wednesday March 02, 2011 @07:18PM (#2282092)
It isn't too hard for someone who is already familiar Apache. On OS X, mod_php is not enabled by default, requiring new users to dig in and learn about apache config files and document roots. I'm not saying it is difficult, and it is obviously important to learn, but it would be nice to be able to have a 1 page "get started with PHP" tutorial.
Re:A Built-in Web Server For PHP by sinaiman on Wednesday March 02, 2011 @07:25PM (#2282108)
Having webrick out of the box was awesome when I first started using Rails. The big difference, however, is that Rails includes a web server because Rails is a framework for developing web applications, while this proposal seems to want a web server included as part of the PHP distributable. PHP isn't exclusively used for web applications, so I don't think it makes too much sense IMO.