7 ms·
> It contains powerful new features and helpful developer tools, such as a built-in web server I haven't finished the article yet, but really? Is that what PH
by d23 13y ago
> It contains powerful new features and helpful developer tools, such as a built-in web server
I haven't finished the article yet, but really? Is that what PHP needs? A built-in web server? It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place.
How long until we start having security releases for the PHP web server, because so many clueless devs decided to launch and run their site with it?
- JohnBooty 13y agoHaving a built-in web server was a tremendous boon for Ruby on Rails. Anybody could run "rails new foo; cd foo; rails server" and run code without installing Apache and mod_whatever. Regardless of what anybody thinks about Ruby developers, I've never heard or seen that "people launching production sites with servers intended mainly for Rails development use" is/was a widespread thing.
- Gigablah 13y agoWhat makes you think a "clueless" dev is going to find out there's a built-in web server in the first place?
- ajankovic 13y agoOr that dev is going to know what is web server.
- Iftheshoefits 13y agoHave you seen any WordPress code? There are a lot of "clueless devs" who stumble upon the most wretched, ill-advised features of PHP and happily (ab)use them. I have been under the impression that that was, in fact, one of the reasons PHP has such a bad reputation (rightly or wrongly).
- maratd 13y agoThe web server is explicitly for development purposes. It is not meant for production. > It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place. This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off. Just because a tool can be misused is not an argument against it nor its inclusion.
- dd3141 13y agoThis. Can't agree more.
- mehwoot 13y agoJust because a tool can be misused is not an argument against it nor its inclusion. I used to believe this, but now I couldn't disagree more. People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. How people use what you make is every bit as important, possibly even more important than the technical merits of what you make. I'd rather a builder use a second hand hammer to nail something than try doing it with a jackhammer.
- Karunamon 13y ago>People can and do misuse things all the bloody time, and the more you enable them to do that This is an excuse for educating people, not an excuse for kneecapping the majority due to an ignorant minority. This is the kind of thinking that plagues the GNOME3 devs and gets ridiculed so often around here. The user is an idiot so let's remove features. I don't see many people harshing on Rails for the inclusion of WEBrick.
- Freaky 13y agoRuby, you mean - it's part of the standard library.
- TeMPOraL 13y ago> People can and do misuse things all the bloody time and the more you enable them to do that, the worse your tool is. In terms of avoiding accidents I agree, but in general, I don't like this kind of thinking. One man's misuse is another man's hack. The flipside here is that the more you limit and subdivide a tool, the worse your tool becomes. I'd also rather see builder using something else than a jackhammer to nail stuff, but then I also want him to have access to one if he needs it, and I strongly want people to stop shouting "omg you can't use X to do Y, because X was not meant to do Y". First principle of hacking: tools do not have inherent purpose, they can be used to do whatever we want; they only can be better or worse at a particular task. The world didn't collapse into logical contradiction the last time I cut pizza with a sound card, because of lack of any other sharp tool nearby.
- robryan 13y agoIsn't that pretty much what people use with rails? No one says that is overkill.
- garethadams 13y agoHas PHP decided whether it's a language or a framework yet? EDIT: To clarify, a framework like Rails definitely has a place for including a web server. Now Ruby has a lightweight web servers in its standard library (but not its core library). Maybe the problem people are seeing with the web server (and it's not a new problem) is the way PHP's core library contains so many things that other languages would leave out as optional includes.
- kiiski 13y agoI think the problem is more likely to be that people here are so predisposed against PHP that they only see the potential problems, and ignore the benefits.
- shocks 13y agoUmm, like Node?
- courtewing 13y agoNot really like node, no. The node http module is part of the standard library and you can use it to build a custom web server. The php web server is built into the php binary, and you can use it to serve up some portion of your filesystem as a PHP app. So it's more like `python -m SimpleHTTPServer` than the node http module.
- userbinator 13y agoI don't think PHP needs a built-in web server, but for a different reason: there's already tons of others you can use with it.
- agumonkey 13y agoit's to isolate from system http server[1]. Before : Install php, write php, install apache / mod_php, refresh. After : install php, write php, refresh. Nothing else. [1] no need to install/configure a complex standalone server, focus on embedded thus more cohesive routing systems instead of fragile rule-on-top-of-regexps as seen in apache.
- girvo 13y agoConsidering the fact that I can set up a development environment in docker using PHP with a makefile and it's built in webserver, I'd say you've missed the point of it. It's a great addition, and with Composer/Packagist (which does currently have an issue with replacement packages, that needs to be fixed) plus the new features in 5.5, I can comfortably say I like using PHP. Also, I've really got to stop reading the comments on PHP threads here on HN. They're repetitive, pointless and negative to the point of blindness. I'll go back to building cool things in it (and Go and Ruby and lately C, because while each of those have their issues they all serve a purpose and do it well).
- debaserab2 13y agoWhat? How often does that actually happen? I don't think I've ever heard of new PHP devs "launching with the built in web server". Django has shipped with a built-in insecure web server for years and no ones crying to fix it. There's things to fix in PHP, but this is not one.