Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Is Apache 2.0 Worth the Switch for PHP?

michael posted more than 9 years ago | from the play-nicely-children dept.

PHP 465

An anonymous reader writes "It seems like some of the members of the Apache Software Foundation are a little angry with the PHP Community because they don't recommend using Apache 2.0 with PHP. Since PHP is installed on half of all Apache servers this is a major issue for them. A number of high-profile PHP community members such as John Coggeshall and Chris Shiflett have blogged about this decision in light of a recent posting by Apache Software Foundation Member Rich Bowen which called PHP's anti-Apache2 stance FUD. Is there any real reason for the PHP community to start recommending Apache 2.0, especially when the 1.3.x series of Apache is rock solid and proven? Note Rich did later commend PHP for being a great product, so it's not all flames."

cancel ×

465 comments

Sorry! There are no comments related to the filter you selected.

lala (-1, Offtopic)

CodeYoddler (674760) | more than 9 years ago | (#11150732)

frist post for the gnaa

Re:lala (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11150911)

As a representative of the GNAA membership committee, I'm afraid I must inform you that we have denied your request to join. You just don't quite seem like GNAA material [goat.cx] to us. Better luck elsewhere [disney.com] .

PHP used to be an ASF project (5, Interesting)

gtrubetskoy (734033) | more than 9 years ago | (#11150738)


I should probably be noted that PHP used to be an official Apache Software Foundation project until it was mutually agreed to end this relationship. I have no clue as to what the underlying reasons were and as an ASF member myself would rather not speculate on this. See ASF Board Meeting Minutes [apache.org] for Feb 2004 (section 5.G).

P.S. Apache 2.0 is great and there is no reason not to use it IMO.

Re:PHP used to be an ASF project (1)

snipersock (575598) | more than 9 years ago | (#11150769)

I'd be real interested to see actual reason and logic behind the php developers to suggest not using with apache2. Sounds petty. But then again I'm a perl developer and php is obsolete to me.

Re:PHP used to be an ASF project (2, Informative)

TheTomcat (53158) | more than 9 years ago | (#11150838)

Read the thread, here [theaimsgroup.com]

S

Re:PHP used to be an ASF project (0)

Anonymous Coward | more than 9 years ago | (#11150865)

I'm a perl developer too. Which is why I'm stuck with apache 1.3, since Duke Nukem Forever will probably come out before mod_perl 2.0 gets out of beta. Maybe around the time of perl6?

Re:PHP used to be an ASF project (0, Offtopic)

Anonymous Coward | more than 9 years ago | (#11150910)

Duke Nukem Forever will be released in January, didn't you read the news yesterday?

Your joke is obsolete.

Re:PHP used to be an ASF project (2, Interesting)

snipersock (575598) | more than 9 years ago | (#11150989)

Last Sunday, if I saw the cpan.org recent news corrently, rc2 was out. Its looking to be released sooner than your probly think. And aside from your problems, I'm running loadbalanced apach2 with mod_perl2 and Mason without any issues at work.

apache2 is essential for Windows (2, Informative)

hey (83763) | more than 9 years ago | (#11150744)

Anybody still running Apache1 on Windows is nuts.
Apache2 works way better on Windows.

Re:apache2 is essential for Windows (5, Funny)

Anonymous Coward | more than 9 years ago | (#11150772)

Anybody still running Apache1 on Windows is nuts. Apache2 works way better on Windows.

Anyone still running Windows is nuts ;)

Re:apache2 is essential for Windows (1, Funny)

Anonymous Coward | more than 9 years ago | (#11150819)

> Anyone still running Windows is nuts ;)

Anyone who runs thru windows is nuts!

Re:apache2 is essential for Windows (1)

Kick the Donkey (681009) | more than 9 years ago | (#11150903)

Anyone who eats nuts is Windows!

How much longer can we keep this joke going?

Re:apache2 is essential for Windows (1)

Zorilla (791636) | more than 9 years ago | (#11150971)

Anyone who nuts on windows gets eaten!

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11151045)

Anyone who uses windows to type up a falsely quoted sig, is nuts!

Re:apache2 is essential for Windows (4, Funny)

KilobyteKnight (91023) | more than 9 years ago | (#11150977)

Anyone who eats nuts is Windows!


How much longer can we keep this joke going?

Anyone who wants to keep this joke going is nuts.

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11151011)

Anyone who attacks peoples' nuts with window glass is a nut

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11151044)

Nibble Windows nuts, before it nibbles yours!

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11150919)

Anyone showing their nuts through windows is liable to be arrested!

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11150967)

Running thru windows is liable to hurt your nuts.

Re:apache2 is essential for Windows (-1, Redundant)

Anonymous Coward | more than 9 years ago | (#11150833)

anybody using apache 1 or 2 on windows is nuts.

anybody using windows as a server is nuts.

Re:apache2 is essential for Windows (1)

Zorilla (791636) | more than 9 years ago | (#11150997)

..or not the boss.

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11150891)

Anybody running ANY Apache on Windows is nuts...

Re:apache2 is essential for Windows (3, Informative)

einhverfr (238914) | more than 9 years ago | (#11150892)

However, the issue is that many PHP extensions are not threadsafe. This becomes an issue on Windows because the default MPM is multithreaded, while the default MPM for UNIX is multiprocess.

Re:apache2 is essential for Windows (0)

Anonymous Coward | more than 9 years ago | (#11150916)

Anybody still running Apache1 on Windows is nuts. Apache2 works way better on Windows.

What, even if it's digitally signed?

Perl vs PHP: The final showdown (0, Funny)

Anonymous Coward | more than 9 years ago | (#11150749)

Let the battle commence [tnx.nl]

So there you have it PHP sucks in comparison to perl, because some guy on the internet says so. Now aren't you glad you stuck with your arcane-obfuscated-gibberish parser?

Re:Perl vs PHP: The final showdown (0)

Anonymous Coward | more than 9 years ago | (#11150861)

Yes, I am glad I stuck with it. PHP is weak.

FUD in it's purest form ... (5, Informative)

Sonic McTails (700139) | more than 9 years ago | (#11150751)

The problem that PHP can be linked against non-threadsafe libraries, and this causes issues with Apache 2 when it's using the Worker MPM. However, if PHP died and takes the thread with it Apache simple restarts it. I had Apache2 and PHP in this configuration for almost a year, and expect for threads randomly restarting because of PHP, I had no issues. If you want to solve the thread problem, change the MPM to prefork (which is the default last I looked), which emulates the Apache1 behavior, and stops that problem.

Re:FUD in it's purest form ... (3, Interesting)

Raxxon (6291) | more than 9 years ago | (#11150857)

This was the major reason that PHP has been said not to be used with Apache2. It has NOTHING to do with Apache, it's potential security issues with PHP and some non-thread-safe **EXTERNAL** libs. 95% of it is security related issues. If you're willing to pay attention to your server (like all good admins are supposed to do) there's no real problems that I've seen.

Just Use PHP on IIS6 (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11150761)

For really robust performance, just use PHP on IIS6 and forget APache altogether!

***ducks for cover***

MOD PARENT UP (-1, Redundant)

Anonymous Coward | more than 9 years ago | (#11151061)

+1, funny

Oblig. (-1, Offtopic)

JamesD_UK (721413) | more than 9 years ago | (#11150762)

In Soviet Russia they simply can't recommend using Apache 2.0 with PHP for Korean old people until it include's Natalie Portman's digitally signed hot grits. Right I'll end the joke here.

Re:Oblig. (0)

Anonymous Coward | more than 9 years ago | (#11150832)

You missed the beowulf cluster of Korean old people...

Learn you damn /. jokes, nube.

Re:Oblig. (1)

temojen (678985) | more than 9 years ago | (#11150998)

In China, Worker-MPM race condition is always positive.

It's a threading issue (5, Interesting)

Bruce Perens (3872) | more than 9 years ago | (#11150764)

Either PHP itself, or many PHP applications, are not written to deal with the multi-threading offered by Apache 2.0 . So, it seems, you will do best if you install one of the less optimal threading models. And then you lose much of the benefit of Apache 2.

Apache 2 and a recent Linux kernel come pretty close to the theoretical limits of the hardware when it comes to serving static content. It just loafs along while saturating whatever net connection you give it. It's worth trying out.

Bruce

I'm sorry Bruce, you'll have to come back later. (5, Funny)

Mr Guy (547690) | more than 9 years ago | (#11150804)

It's not nearly late enough in the thread for someone respected to post correct, non-inflamatory, rational information.

You're going to stop all the foaming at the mouth, and who wants a half-frothed troll this close to Christmas?

Re:I'm sorry Bruce, you'll have to come back later (5, Funny)

Bruce Perens (3872) | more than 9 years ago | (#11151028)

It's OK because I didn't read any of the articles linked to in the Slashdot story before posting. Thus, I maintain the proper level of ignorance for Slashdot.

On the other hand, I had looked at the problem reasonably hard when choosing supported software for UserLinux, so I did know something about the problem. So perhaps that disqualifies me.

Bruce

Re:It's a threading issue (2, Insightful)

Anonymous Coward | more than 9 years ago | (#11150829)

I beg to differ. Apache 1 or 2 for that matter is no where near the maximum performance level when it come sto serving static content.

As projects such as thttpd, tux, boa, lighttpd and many others clearly demonstrate. In fact the performance of Apache 1/2 is no where near what the solutions I've mentioned offer.

Slashdot uses Boa for images (4, Informative)

Tim Macinta (1052) | more than 9 years ago | (#11150954)

I beg to differ. Apache 1 or 2 for that matter is no where near the maximum performance level when it come sto serving static content. As projects such as thttpd, tux, boa, lighttpd and many others clearly demonstrate. In fact the performance of Apache 1/2 is no where near what the solutions I've mentioned offer.
Quite true. I've improved the performance in the past of a very high traffic website by switching what content I could from Apache to Boa. Boa performed substantially better than both Apache 1.3 and 2.0. If you need further evidence, look at the HTTP response headers for one of Slashdot's own images [slashdot.org] - they are serving images using Boa instead of Apache for a reason.

This isn't to say that Apache is worthless. On the contrary, it is an exceptionally good server. It just doesn't scale as well as some others for static content.

Homegrown apps are one thing... (1)

khasim (1285) | more than 9 years ago | (#11150850)

The question is, is there a plan to resolve this threading issue in the future?

If not, then you can either run Apache2 with the pre-fork or just accept restarts or run Apache1.x.x

If it will be dealt with then this isn't much of a problem long term. It's just short term growing pains.

Re:It's a threading issue (5, Informative)

TheTomcat (53158) | more than 9 years ago | (#11150932)

All due repect (and I have a lot of it), but:
Either PHP itself, or many PHP applications, are not written to deal with the multi-threading offered by Apache 2.0.

That's just plain not true. The underlying threading problem has little to do with PHP, and absolutely nothing to do with PHP applications, but libraries to which PHP links (libmysqlclient, libpdf, libmcrypt, etc etc etc). It's these third-party libraries (over which the PHP developers have no control) that cause Apache2 to be unstable in the various threading modes (prefork works fine, but is just not officially supported).

S

Zounds!!! We've finally achieved par with Windows (1, Insightful)

Anonymous Coward | more than 9 years ago | (#11151002)

The underlying threading problem has little to do with PHP, and absolutely nothing to do with PHP applications, but libraries to which PHP links (libmysqlclient, libpdf, libmcrypt, etc etc etc). It's these third-party libraries (over which the PHP developers have no control) that cause Apache2 to be unstable in the various threading modes (prefork works fine, but is just not officially supported).

Sounds exactly like the wonderful world of Windows programming :-)

Re:It's a threading issue (0)

Anonymous Coward | more than 9 years ago | (#11151032)

In either case, it was one of the great features of the prefork module that poorly designed or buggy libraries could happily exist in a fault-tolerant enough environment that even when they kill-9'd themselves the server would happily keep working.

Even so (1)

einhverfr (238914) | more than 9 years ago | (#11150958)

Apache2 with a prefork MPM still way outperforms Apache 1.3 with PHP and is rock solid. Too bad this is not the default on Windows.

If you use the worker or Win32 MPM, you are stuck with using CGI.

Re:It's a threading issue (1)

Pecisk (688001) | more than 9 years ago | (#11150979)

I can second that. PHP has very serious issues with threading, so it is beheaving very strange and not relaibly with worker module with Apache2. Sure, you can use it with standard module but why do it so then? It is not worth the switch - if you don't have other issues of coarse.

But not to make flames, I must admit that I use Apache 2 over first version and I really love PHP and that code landmass it has created in last 5 years.

Re:It's a threading issue (2, Informative)

markv242 (622209) | more than 9 years ago | (#11150982)

FYI, PHP compiled in CGI-mode completely eliminates the threading issues that PHP has with Apache 2, and allows you to continue to use Apache in worker mpm mode (which is, by far, the most efficient -- think orders of magnitude better performance on the same hardware).

The CGI may be a little slow to start up a PHP interpreter, etc etc, but it is rock solid. That said, using a real multithreaded application server (like, oh, any of your Java app servers) with Apache 2.0 is the best solution.

Apache 2.x memory model is bizarre (1, Informative)

Anonymous Coward | more than 9 years ago | (#11151058)

The memory pools in Apache 2.x (apr_pool_t) are quite inefficient [slashdot.org] . They have per-thread pools of memory that are only released when a thread finishes processing an HTTP connection. Apache 2.x uses more memory than Apache 1.3.x as result. I see no reason to switch from the very efficient Apache 1.3.x line.

Multi-thread... (2, Insightful)

allanw (842185) | more than 9 years ago | (#11150771)

Well, as the article probably says.. Many of PHP's modules aren't thread-safe. So there'll be little errors that might not show up until you have thousands of concurrent accesses. This of course can be solved by using the pre-fork config for Apache2..

Re:Multi-thread... (1)

chtephan (460303) | more than 9 years ago | (#11150848)

Right.

I'm using PHP on a pre-forking Apache2 now and it's working like a charm.

Actually, PHP could add locking around library calls that are not thread safe. While PHP is easy to use and offers a lot of functionality the PHP code for the extensions is just a big mess design-wise.

Forget PHP! (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#11150773)

...and start using mod_python which will only work on apache 2.

Move along, nothing to see... (0)

Saeed al-Sahaf (665390) | more than 9 years ago | (#11150777)

This is OLD NEWS. Zillions of web sites now use and have used for some time, the latest PHP with Apache 2. And on production servers! Woo hoo!

Move along, nothing to see...

No need to switch ... (5, Interesting)

Anonymous Coward | more than 9 years ago | (#11150783)

I run a FreeBSD server with Apache 1.3.33 and PHP 4.3.10. When I was upgrading it a week or two ago to FreeBSD 5.3, I thought about making the switch to Apache 2.0. But then I thought ... What is that going to bring me?

Apache 1.3 has been working flawlessly for me. Until I have a compelling need to switch to Apache 2.0, I'm not going to. I understand that there are some nifty new features in Apache 2.0, but not a single one of them is something that I want/need.

This, I think, is the primary reason why people aren't going to Apache 2.0 in droves, not the PHP team's "FUD".

Re:No need to switch ... (2, Insightful)

garcia (6573) | more than 9 years ago | (#11150969)

Apache 1.3 has been working flawlessly for me. Until I have a compelling need to switch to Apache 2.0, I'm not going to. I understand that there are some nifty new features in Apache 2.0, but not a single one of them is something that I want/need.

Exactly. This is happening with a lot of free software lately, namely the Linux kernel... I used to keep up-to-date on the kernel just because it was always getting better.

2.4.x has been rock solid for me and 2.6.x just doesn't offer anything to me that makes me compelled to move to it (in fact I had issues w/my ethernet cards working under it).

Apache 1.3.x has been absolutely fine and continues to update via apt-get/aptitude. Why should I bother with 2.0.x? Give me one reason why this needs to be an issue? PHP people think that PHP runs better under 1.3.x and Apache continues to develop that version. I don't see the problem.

Apache, if you don't want people to use 1.3.x stop development and give people a good reason to switch.

The site appears to be struggling (1, Informative)

Sonic McTails (700139) | more than 9 years ago | (#11150787)

Slashdot Mirror of Text: --- PHP's anti-Apache2 FUD My biggest objection to PHP is the anti-Apache2 FUD that they spread. Indeed, they seem to be the ones primarily responsible for the anti-Apache2 FUD. This is unfortunate, since there are few remaining legitimate reasons for avoiding Apache2, and it's a shame that they feel the need to manufacture one. So, to quote the PHP docs: Do not use Apache 2.0.x and PHP in a production environment neither on Unix nor on Windows. This is further clarified in the FAQ with a long description which starts, unfortunately, with a misconception, namely: The major feature that draws people to Apache 2 is threading. It then goes on to explain why threading is, potentially, a problem with PHP, why this is not, technically, PHP's fault, and so PHP cant fix it. All very correct, really. And, so, very logically, it concludes that there's no reason to move to Apache 2, and that everyone should stick with Apache 1.3. This argument suffers from one main flaw. That is, that the initial assumption, from which everything flows, is just plain wrong. Yes, threading is cool, and is a major shinyness with Apache 2. However, it is not, by any stretch of the imagination, the only, or even the main, reason for moving to Apache 2.0. There are a *lot* of other much better reasons for moving to Apache 2.0, none of which pose any threat to PHP. I've covered those in my OnLamp article, and so won't repeat them here. Apache 2.0, running with a prefork MPM, works great with PHP, and gives you all those other benefits. The additional benefit is a little more subtle. Apache 1.3 is becoming "legacy". Meaning that the real developers are focusing more on 2.0. The 2.0 docs are better. 2.0 (and 2.1) gets the new features, the documentation improvements, and the newly clarified directives and error messages. Thus, 1.3 becomes harder and harder to support. So, increasingly, the PHP questions are coming from folks that are running 1.3, and the solutions offered just don't work, because they are things added in 2.0 to solve exactly the irritations that these folks are having. So, I entreat the PHP folks to remove this incorrect anti-Apache 2.0 tirade from their documentation, and replace it with a more balanced and correct explanation of the issues involved, and the recommended solution. Namely, that people go ahead and move to Apache 2.0, but stick with a Prefork MPM. This gives them most of the benefits of Apache 2.0, but removes the irritating threading issues. Nobody blames PHP for those threading issues (at least, people who have taken the trouble to actually understand the issue don't), so there's no slight on the PHP developers implied here. I'd be glad to participate in this to any degree that you like. I actually enjoy writing documentation, and I'm increasingly using PHP for my own work. Please?

Re:The site appears to be struggling (1)

UnknowingFool (672806) | more than 9 years ago | (#11150909)

While I commend your efforts to bring this information to the rest of us, I am disappointed with the dearth of line breaks that you included with your post. :)

A solution looking for a problem. (1, Interesting)

Anonymous Coward | more than 9 years ago | (#11150793)

Seems to me Apache 2 is a solution looking for a problem. Yes, they can create some strawman arguments about some hypothetical thing 2 may do better than 1.X. But for all real-world problems I've encountered, Apache 1.X suits me just fine.

If Apache wanted people to move to 2, they should provide benefits that make people want to go through the effort to move.

Re:A solution looking for a problem. (1)

davegaramond (632107) | more than 9 years ago | (#11150949)

Actually there are real problems in Apache 1.3.x that are addressed (or supposed to be addressed) by Apache 2.x. Threads, for one. Servers on Windows really should use threads and not processes due to the immense overhead of process creation.

And then there's supposed to be a per-child MPM that can separate multiple users better. I've never heard more of it these days. Anyone knows whatever happened to it? If there's one compelling reason to upgrade to Apache 2, that's _it_ for me.

I don't recommend it (1)

0x54524F4C4C (712971) | more than 9 years ago | (#11150795)



PHP doesn't mix with multithreading. It only likes fork()'s. And communist software, like Apache 1.3.

Been using PHP4 and Apache2 for a Long Time (1)

brandonp (126) | more than 9 years ago | (#11150799)

I've been using php 4 and Apahace 2 for a long time on my web servers. They're not high volume servers, but I've not had problems.

I can't remember when Redhat started using Apache 2, but I've been using it as soon as they included it into their packages.

Is this an issue that would resolve itself as Linux Distributions include Apache 2 and the # of Linux servers increases. As you have a higher volume of Apache 2 servers out there, it will tip the balance toward a friendlier attitude between PHP and Apache 2?

--

Brandon Petersen
Get Firefox! [spreadfirefox.com]

a bit thin? (1)

ckuhtz (87644) | more than 9 years ago | (#11150800)

I'm sorry. Does anyone have actual pointers to what the issues with Apache2 & PHP are? The reference to the board meeting notes really doesn't offer any insight as to what's going on here.

Seems to work fine here.

I have no reason to switch. (1)

dangermen (248354) | more than 9 years ago | (#11150805)

A) yes, Apache 1.3 is solid.
B) I have no requirement to switch.
C) If A & B are true, I don't recommend 2.0 as it is NOT as tested as 1.3.

Re:I have no reason to switch. (2, Insightful)

snipersock (575598) | more than 9 years ago | (#11151016)

Yeah, be very affraid of new technology, it could be better and force you to upgrade.

Why are there two?? (5, Insightful)

jdavidb (449077) | more than 9 years ago | (#11150806)

Can anyone point me to a succint explanation of why there have been an Apache 1.x line and an Apache 2.0 line for years? This to me has always seemed like an implicit statement from the Apache people that I should not yet move to 2.0.

I checked the front page of Apache and there were release announcements for the latest version of both lines. Neither announcement carried a statement indicating when you should use it over the other. The front page does not appear to link to anything addressing the issue, and the FAQ does not appear to handle it, either.

Re:Why are there two?? (2, Informative)

jdew (644405) | more than 9 years ago | (#11150864)

From what I've gathered, Apache2 is a reimplementation and 1.x is just in maintenence mode (security fixes etc)

Re:Why are there two?? (0, Offtopic)

Anita Coney (648748) | more than 9 years ago | (#11150868)

"American Presidential debates are rigged [opendebates.org]."

Yeah, big deal. So are the elections.

Re:Why are there two?? (1, Interesting)

Anonymous Coward | more than 9 years ago | (#11151007)

Commercial software vendors typically deploy products in this manner. They fork the code base, or rewrite it entirely but continue to maintain and support the old base for many years.

The apache foundation is one of the FEW open source projects that actually do this. Its probably one of the reasons why the apache webserver is so ubiquitous.

On the other end of the spectrum, you have jboss. Uggg. Go from 3.2.3 to 3.2.5 to 3.2.6 and all are MAJOR upgrades in terms of effort to migrate your code base to the new versions. Its horrible. I would have loved it if 3.2.3 had been supported with regular patches, upgrades etc... but was forced to move to the higher "point" releases. bleh.

Re:Why are there two?? (5, Informative)

Anonymous Coward | more than 9 years ago | (#11151008)

I checked the front page of Apache and there were release announcements for the latest version of both lines. Neither announcement carried a statement indicating when you should use it over the other.

It's on the download page [apache.org] :

"Apache 2.0.52 is the best available version"

"Apache 1.3.33 is also available"

The message would appear to be '2.0.52 is the best, but if you insist you can get a lesser version'.

Apache1 vs. Apache2 (1)

Meostro (788797) | more than 9 years ago | (#11150812)

Who can specifically give me a reason to switch from A1 to A2 if I'm using PHP? Not that I have control over it on my ISP, but I'm curious as to what A2 adds that I should need, independent of developing in PHP.

For the record, I'm still using Win2k and Office97 @ home because I see no reason to upgrade. I have XP @ work, and it's great, but it's not better enough for me to care.

I agree with the link in the second article, though, that the PHP documentation shouldn't single out A2 unless it also notes compatibility problems with other OS/WS combinations.

And it wasn't made clear, what is the reason that PHP doesn't like multi-threaded mode? It suggests that the programs/libraries that PHP utilizes are not thread-safe, but if PHP is itself multi-threaded, why does it make a difference?

Re:Apache1 vs. Apache2 (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#11150987)

Who can specifically give me a reason to switch from A1 to A2 if I'm using PHP?...For the record, I'm still using Win2k and Office97...

You wouldn't understand.

Clarification (1)

sp3c1alK (604261) | more than 9 years ago | (#11151063)

I think the Apache Foundations problem isn't with people who don't want to upgrade (if it ain't broken...) but with PHPs recommendations against using Apache2 with PHP.

Note to Slashdot moderators (0, Offtopic)

gtrubetskoy (734033) | more than 9 years ago | (#11150820)


I'm a little ticked off that news like this makes the front page, yet release of mod_perl 2.0 years in the making, on Dec 12, is yet to be mentioned. I am more than certain that someone must have submitted a story on it in the Apache section.

Re:Note to Slashdot moderators (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#11150885)

That's because Perl is dead. Thus, mod_perl isn't newsworthy.

Re:Note to Slashdot moderators (0)

Anonymous Coward | more than 9 years ago | (#11150942)

That's because Perl is dead. Thus, mod_perl isn't newsworthy.
btw, the poster of your parent comment is the author of mod_python... go figure

Re:Note to Slashdot moderators (1, Insightful)

Smitty825 (114634) | more than 9 years ago | (#11150959)

The /. moderators really don't have any control over what appears on /. or not...you should be ticked off at the Editors!

Re:Note to Slashdot moderators (1)

dsaljurator (40058) | more than 9 years ago | (#11150972)

mod_perl 2.0 hasn't been released. RC1 of MP2 has been released. I'm pretty sure you'll be able to count on MP2's formal release making slashdot's main page.

Re:Note to Slashdot moderators (0)

Anonymous Coward | more than 9 years ago | (#11150984)

I'm a little ticked off that news like this makes the front page, yet release of mod_perl 2.0 years in the making, on Dec 12, is yet to be mentioned. I am more than certain that someone must have submitted a story on it in the Apache section.

That's because only old Korean's use mod_perl.

Re:Note to Slashdot moderators (1)

snipersock (575598) | more than 9 years ago | (#11151057)

Ahh and while I agree there was a very small announcement on search.cpan.org.

Started using PHP 5.x + Apache 2.x (1)

stilwebm (129567) | more than 9 years ago | (#11150822)

I've been migrating several live production sites and adding new sites to a box with PHP 5.0.3 and Apache 2.0.52. The previous setup was rock solid Apache 1.3.x and PHP 4.x. I started the migration with the lowest traffic sites and plan to slowly move up to higher traffic sites. So far there have been no issues.

PHP is for teenagers. Real men code C. (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11150824)

PHP translates into "English major" in maybe 7 different languages.

PHP and Threaded Apache (3, Informative)

Daeron (4056) | more than 9 years ago | (#11150826)

I guess the only reason i can think of not to use PHP on Apache-2 ... is if you absolutely HAVE to use a threaded version of Apache-2.

THe apache-2 (Worker MPM) itself is rock solid and definately seems to boost performance of ones http-server compared to traditional apache-1.3.

I am not exactly sure about a prefork-MPM vs apache-1.3 comparison.

The biggest problem with PHP on any threaded Apache-2 (i am not sure if this holds true for the 1.3 series as well) ... is the fact that PHP keeps continuously crashing your httpd-processes.

Switching to the prefork MPM makes everything rock-solid again ... but looses the benefits the threaded-MPMs offer.

If PHP could actually solve their problems with running in a threaded Apache-2 ... i would jump right on it :)

Again .. i never experimented with a threaded apache-1.3 (not even sure if that's possible) ... but for Apache-2 with the current state of PHP .. it's not recommended ...

IIS (0)

Anonymous Coward | more than 9 years ago | (#11150827)

When IIS 6.0 is more secure than Apache 2.0, thats when I refuse to use Apache.

Well worth the upgrade (3, Informative)

cybermint (255744) | more than 9 years ago | (#11150830)

Apache 2.0 has proven to have so many new features that it was well worth the upgrade. Early on we encountered some minor issues with the threads, so we switched to pre-fork and have had no issues. We have been running PHP and mod_perl in pre-fork mode without a single issue for the last year. Unless you cannot switch because you use a module with no 2.0 support, I would make the switch immediately. And don't forget, you can always install both apache 1.x and 2.0 to give it a test run.

Nobody told me! (2, Interesting)

Anne Thwacks (531696) | more than 9 years ago | (#11150834)

I never knew there was a problem - I have three mission critical servers (telecomms billing) running PHP5 on Apache 2, and nothing seems to have gone wrong in 12 months of 24/7 operation.

What is supposed to be the problem?

Why Switch? (0)

Anonymous Coward | more than 9 years ago | (#11150872)

I don't understand what motivation there would be for me to switch from a perfectly functioning Apache 1.3.x to Apache 2. As far as I can tell there are no features that would benefit me in any way. I ran Apache 2 with PHP 5 on Windows on my desktop (as a test, definitely not production) and had a few problems related to SSL. Why would I go out of my way to create trouble for myself?

With that said, I think the position on Apache 2 should be as accurate as possible so that new users can pick either version.

PHP and Apache 2.0 seem fine (2, Insightful)

Dr.Dubious DDQ (11968) | more than 9 years ago | (#11150873)

As mentioned (probably more than once by now), the only issue is some non-thread-safe libraries that PHP can link to. Configuring Apache to run with the "Prefork" MPM solves this problem (by running with the same model as Apache 1.x did).

I see no reason so far to discourage use of Apache 2.0 with PHP other than vague "well, I heard from some guy that he tried it and it had some kind of problem" sort of complaints. Personally, I like the fact that Apache 2.0x has mod_ssl and mod_deflate (/mod_gzip) as part of the codebase, so I no longer have to compile and install them separately...

Religious War... (1)

Lodragandraoidh (639696) | more than 9 years ago | (#11150876)

Sounds like PhP is trying to manipulate the behavior of the Apache group.

If the issues are not substantive then why the big hulabaloo?

Religious wars only serve to speed up entropy in the system...

SemWebCentral runs Apache2 + PHP... (1)

tcopeland (32225) | more than 9 years ago | (#11150894)

...right here [semwebcentral.org] .

It's been serving a decent amount of traffic [semwebcentral.org] for quite a while with no problems...

Frontpage (1)

ManuelKelly (446655) | more than 9 years ago | (#11150905)

Isn't frontpage support the other major reason to stick with 1.3? I don't believe it is available for Apache 2.

A lot of "Web Designers" seem to expect the frontpage extensions to be available.

Re:Frontpage (1)

adeydas (837049) | more than 9 years ago | (#11151005)

does that many people really use frontpage...

If they don't use it (1, Insightful)

Anonymous Coward | more than 9 years ago | (#11150912)

it must be useless for anyone who wants php. That seems to be the main theme of these posts. Just because a feature doesn't provide much to a pure php setup doesn't mean that there aren't people who want to run php as part of their site but still need some of what apache 2 offers. Seems pretty short-sited.

Using PHP on Apache 2.0 right now. (4, Interesting)

suso (153703) | more than 9 years ago | (#11150925)

I'm using PHP on Apache 2.0 production servers right now. Honestly, I can say that PHP is more at fault for its own problems. I think that having lots of configurable options for a programming language is a bad idea. It leads to applications working on one installation of PHP, but not another. Administrators who enable things like safe_mode and turn off register_globals on shared servers are made fun of by ignorant programmers who don't understand what safe_mode is for and its usefulness. I have encountered all of this.

The one thing that I wish PHP would take advantage of in Apache 2.0 is the ability to run code as a user other than the web server. Every time I bring this up with the PHP developers, nobody really runs with it. A feature like this would make PHP much better in shared systems and prevent people from having to do weird things to ensure security. I guess PHP is not that great for shared systems right now.

disillusioned (slightly) (1)

asliarun (636603) | more than 9 years ago | (#11150939)

and here i was, thinking that the open source community is the one place that's devoid of politics.

sigh

2.0 issues (0)

Anonymous Coward | more than 9 years ago | (#11150946)

I know for a fact there are issues with Apache 2.0 and PHP. There are a few functions that do not work correctly, and their answer in the PHP fourms is to go back to Apache 1.x. Grrr.....

If you'll be switching anyway... (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#11150965)

...then why not switch to a far superior platform like ASP.NET on IIS6?

Making the sqitch (2, Informative)

haplo21112 (184264) | more than 9 years ago | (#11150966)

I amde the switch over to Apache 2.0 and PHP 5 about 3 weeks ago at this point and have found it to be rock solid so far. My impression was that the PHP guys are recommending PHP4 for Apache 1.3.x and PHP5 for Apache 2.0.x. So in translation what they are not recommending is PHP4 on Apache 2.0.x. Perhaps I have gotten the wrong impression but that's what I got...

No its not worth it, (5, Funny)

Jason Hood (721277) | more than 9 years ago | (#11150976)


Stick with kernel 1.3.79 and Apache 1.1 just to be "safe".

Don't Listen to Rich (0)

Anonymous Coward | more than 9 years ago | (#11150980)

I have worked in the past with Rich Bowen, in his mind everything he works on is perfect and people should not fear. If the php people say, don't use Apache 2 yet, then let's listen to them.

What extensions? (3, Interesting)

bucky0 (229117) | more than 9 years ago | (#11150994)

Is there a list somewhere of extensions that are known to be non-thread safe? Or do I need to just test them one by one?

Apache2: The only choice for Win32 (1)

Spy der Mann (805235) | more than 9 years ago | (#11151021)

If you have a win32 server and want to put a WAMP (Windows/Apache/MySQL/PHP) stack for your website, Apache2 is the only choice. Apache 1 isn't recommended for win32 servers...

so far Apache2 is working perfectly. And I really like the new syntax for add-on modules.

Offtopic:
*HOWEVER*, If we want to take things commercial grade, I'd gladly ask the Apache and PHP guys to fix their "nobody" user problem, and start PHP with separate accounts. It's hideous for security having a user with access to all the subdirectories. Our website in a shared host got defaced a month ago because of this "tiny detail"

From the PHP Manual (0)

Anonymous Coward | more than 9 years ago | (#11151033)

http://www.php.net/manual/en/faq.installation.php# faq.installation.apache2 [php.net]

1. Why shouldn't I use Apache 2 in a production environment?

The following answer is based in this modified excerpt of a mail by Rasmus Lerdorf.

Apache 2 is a complete rewrite and a complete architecture change from Apache 1. It is not like going from PHP 3 to PHP 4 or from PHP 4 to PHP 5. There is a lot of code that is common, and certainly the base architecture of PHP has not changed for years. So comparing Apache 1 vs. Apache 2 to PHP 4 vs. PHP 5 makes no sense. The architecture has been proven over the years and the code, while somewhat unwieldy in places, is a known entity. PHP from the very early days was designed against this basic Apache 1 architecture and works extremely well running under it.

The major feature that draws people to Apache 2 is threading. On Windows where most basic libraries are, and must be, threadsafe, Apache 2 does actually make sense and it would be good to work out the kinks on that platform. However, on UNIX there are a lot of basic libraries where thread safety is an unknown. And this is not about PHP extensions, it is about 3rd-party libraries underneath PHP's hundreds of extensions. Whether any one 3rd-party library is threadsafe is really hard to determine. There are a lot of variables involved, including which OS, which version of the OS, which libc, which version of that libc and on some platforms even the compiler flags used to compile these things. And to make it even more fun, tracking down a thread safety problem is damn well near impossible. Hundreds of people may well state that Apache+PHP+ext/foo works perfectly for them, but maybe they are only getting about a million hits a day. Then another user comes along who gets 100 million hits a day and uses a fast dual-cpu machine and everything blows up because now suddenly the window for some tiny race condition has been made much larger due to the faster cpu speeds, the second cpu and the higher frequency of requests. And the bug report we get from this user will be something along the lines of:
It don't work sometimes. Most of the times it works fine, but then every now and then it just don't. The error is different each time and I have no idea how to reproduce it, but fix it right away!!!
What can we do about these?

There are a number of (fixable) technical reasons Rasmus does not think Apache2+PHP is a good idea in a production environment, but setting those aside it really boils down to one simple concept:

PHP is glue. It is the glue used to build cool web applications by sticking dozens of 3rd-party libraries together and making it all appear as one coherent entity through an intuitive and easy to learn language interface. The flexibility and power of PHP relies on the stability and robustness of the underlying platform. It needs a working OS, a working web server and working 3rd-party libraries to glue together. When any of these stop working PHP needs ways to identify the problems and fix them quickly. By making the underlying framework more complex by not having completely separate execution threads, completely separate memory segments and a strong sandbox for each request to play in, a feet of clay is introduced into PHP's system.

Using the prefork mpm with Apache 2 to avoid the threading is possible, and yes using a standalone fastcgi mechanism to avoid the threading, too, but then defining characteristic of the web server of choice are avoided. At this point in its development, Rasmus still maintains that one is better off simply sticking with Apache 1 for serving up PHP pages with the one caveat that Apache 1 sucks pretty badly on Windows.

apachetoolbox supports the 1.x apache (2, Interesting)

phildog (650210) | more than 9 years ago | (#11151052)

For me the reason to use apache 1.x with PHP is very simple. That is the only configuration that is supported by ApacheToolbox [apachetoolbox.com] .

I've done the roll-your-own apache/mod_perl/mod_php/mod_etc.etc.etc... thing before. I'd love to have those hours of my life back. So if the Apache foundation really cares about evangelizing 2.x why don't they create something as powerful as ApacheToolbox that actually works with 2.x?

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>