PHP and Apache
December 25th, 2004 • PHP
Following the latest discussions on PHP vs. Apache, I felt I had to say something about it. John Coggeshall doesn’t really think there’s a real reason to switch and actually consider Apache2; but guess what? That’s wrong!
Some people at the Apache community are pretty pissed off at how PHP pushes people away from Apache2 although it’s literally the next best thing after 1.3. The reason is obvious, Apache guys want people to use Apache2, PHP guys say don’t. Of course you can say that in thousands of pretty ways, but the fact remains that PHP people (and especially module writers) aren’t paying much attention to Apache2.
But why? Apache2 has all sorts of great features, like threading, filtering, module API, etc. Why not make use of it? I hear you say “If it ain’t broken, don’t fix it”. Well duh, Windows 3.11 wasn’t broken (sort of), OS/2 seemed like a solid system too, heck PHP4 wasn’t broken, it worked, didn’t it? But weren’t they “fixed”?
Competition people, competition is the keyword here. If Apache wasn’t striving to be the best free server around it wouldn’t have took a large chunk of the market. If PHP wasn’t rapidly evolving, nobody, I mean absolutely nobody would’ve considered using it in some enterprise software. It’s the competition that keeps our software ticking, we don’t want to be left behind.
“Ummm… remind me again, what does this have to do with PHP vs. Apache?”. Well, PHP was an official Apache project, and for some reason they were dropped, although Apache is the key to PHP’s success. Forget about easy-to-learn, forget about supported, forget about all that stuff, if Apache wasn’t huge at the time PHP came by, I really don’t think PHP would’ve found an environment to run on. PHP was made for Web applications, and Apache is the de facto Web server; any resemblance?!
I know there are still people who didn’t upgrade to Apache2, but one of the main reasons is PHP’s insistence on staying with the older version. Many say that PHP is more stable on 1.3, PHP is faster on 1.3, PHP is so and so, so let’s not switch. Well if PHP actually made use of Apache2 it would’ve run much faster, benchmark it and you’ll know what I’m talking about.
In the open source world, “What’s in it for me?” is kind of a meaningless question, there’s always the accompanying “What’s in it for us?”. There’s nothing wrong with staying with older versions for certain reasons, but it’s still wrong to use the same reasons not to advance. Imagine Apache guys were as stubborn and decided not to support PHP5 because they didn’t like how it’s spelled! Wouldn’t that be a shame?
Perl learned how to make friends with Apache, basically you can stick some Perl code anywhere in the filter chain, you can even write Apache modules with Perl, and developers seem to like it. Well PHP can’t do that right now, not that it has to, but that would’ve been a very nice addition. Please, make love not war, let PHP and Apache live in glory!