Slashdot Mirror


Is Apache 2.0 Worth the Switch for PHP?

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."

465 comments

  1. PHP used to be an ASF project by gtrubetskoy · · Score: 5, Interesting

    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 for Feb 2004 (section 5.G).

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

    1. Re:PHP used to be an ASF project by snipersock · · Score: 1

      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.

    2. Re:PHP used to be an ASF project by TheTomcat · · Score: 2, Informative
    3. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      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?

    4. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0, Offtopic

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

      Your joke is obsolete.

    5. Re:PHP used to be an ASF project by snipersock · · Score: 2, Interesting

      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.

    6. Re:PHP used to be an ASF project by slive · · Score: 2, Interesting

      PHP used to be called an ASF project. But that was back when being an ASF project didn't really have any formal meaning. When the ASF started to put more structure on its oversight process in order to assure that it could protect its code and committers, it was decided that the PHP project didn't want ASF oversight, and there was an amicable separation.

    7. Re:PHP used to be an ASF project by iamlucky13 · · Score: 4, Insightful

      From the blogs, it sounds to me like the php guys haven't recommended not using Apache 2, but rather have not recommended it. Although they haven't stated any harms aside from it's an unproven platform, they haven't found any benefits, either. So they said why bother.

      Although on the surface that sounds pretty neutral, I can certainly understand Apache being concerned about this, considering how closely affiliated the two are (as the grandparent noted). I like analogies so imagine bringing home a couple of girlfriends over the years for Mom and Dad to meet. Then you meet an even better girl whom you invest a lot of effort into impressing and you're sure they'll love her, but instead they say, "what was wrong with your last girlfriend?" While your parents haven't said anything against your new lady friend, they've implied they're not impressed. I admit, dating is a poor analogy for some of the regulars here, but at least it was fun while lasted, right?

      I agree that it sounds somewhat petty. Why not say something a little more friendly like, "We've seen great things from the Apache Foundation, and while we're not prepared to fully endorse version 2, we're anxious to see how it performs?" It's simple, generic, non-committal, open-ended, political-style BS, but it keeps people happy.

    8. Re:PHP used to be an ASF project by JamesOfTheDesert · · Score: 4, Funny
      But then again I'm a perl developer and php is obsolete to me.

      Hello, pot? This is kettle ...

      --

      Java is the blue pill
      Choose the red pill
    9. Re:PHP used to be an ASF project by Matt+Perry · · Score: 4, Informative

      IIRC, it was a license issue. The AFS wanted the PHP project to switch to using one of the ASF licenses while the PHP folks did not. PHP is still listed as a sister project. It's just not under the official ASF umbrella.

      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    10. Re:PHP used to be an ASF project by wdr1 · · Score: 1

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

      mod_perl?

      -Bill

      --
      SlashSig Karma: Excellent (mostly affected by moderatio
    11. Re:PHP used to be an ASF project by scragz · · Score: 1

      I've had very real problems with Apache 2 processes remembering PHP settings from one virtual host it served a page from and applying them to the next virtual host. This is using the supposedly "safe" prefork version.

      And I don't think obsolete is quite the word you're looking for.

    12. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      i'm a server-side java programmer, and perl is obsolete to me [now that there's an essentially equivalent regexp API]

    13. Re:PHP used to be an ASF project by Ath · · Score: 4, Informative

      No, the PHP folks specifically tell you not to run PHP with Apache 2.0. It is in their FAQ on their website.

    14. Re:PHP used to be an ASF project by Nicholas+Hill · · Score: 1

      You make a sarcastic point but your comment has an element of truth to it - specifically, obsoletion. Ever heard of the word "deprecation"? As new versions of software, such as Apache 2, come out, they leave "old versions" of code in. Looking at PHP itself shows a whole host of arcane / ancient features. $HTTP_POST_VARS, anyone? These days, it is $_POST, but worse than that is the fact you can use BOTH. Most software suffers from an abundance of deprecated features that clutters what used to be good, free space. Its as if, in an attempt to stop this spiralling out of control, the coders at PHP want to restrict to a solid Apache 1.x. My personal opinion is that PHP should start again, like Microsoft often does. They released .NET with gaping holes in its support for old Visual Basic projects, but it bought about a faster and more solid way of coding Visual Basic ("TYPE-2") Projects.

    15. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      An analogy most slashdotters might better understand:

      Imagine you download two photo shoots worth of porn. A blond with big tits and a brunette with nice hand-size tits and a tight ass.

      You jerk off to both, and love every minute.

      Then you download a redhead, and MAN is she hot. You almost regret jerking off the first two times. So you immediately start jerking off to it, but alas, no juice left in the ol' freshmaker. You have to wait until later.

    16. Re:PHP used to be an ASF project by killjoe · · Score: 4, Informative

      What seems to be lost in the noise is that PHP guys are not saying there is anything wrong with apache2. They are acknowledging that not all the extentions in PHP are thread safe.

      In other words it's PHP at fault and not apache2 and they are admitting it.

      --
      evil is as evil does
    17. Re:PHP used to be an ASF project by Taladar · · Score: 2, Funny
      My personal opinion is that PHP should start again, like Microsoft often does.
      You misspelled "seldom"
    18. Re:PHP used to be an ASF project by datasetgo · · Score: 0

      what is this 'girlfriend' you speak of?

    19. Re:PHP used to be an ASF project by osu-neko · · Score: 2, Interesting

      I've had the same sort of virtual host problems with PHP, except under Apache 1.3.

      --
      "Convictions are more dangerous enemies of truth than lies."
    20. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      Since when is a BSD license considered viral?

    21. Re:PHP used to be an ASF project by lewp · · Score: 1

      Oh, now I get it.

      --
      Game... blouses.
    22. Re:PHP used to be an ASF project by TheSpoom · · Score: 1

      It should be noted that PHP works on Apache 2 just fine (I run it on Apache 2 on my server). That said, the PHP developers do specifically state not to use Apache 2 in a production environment. I personally have not listened, though my server is not exactly used for a lot. ;^)

      --
      It's better to vote for what you want and not get it than to vote for what you don't want and get it.
      - E. Debs
    23. Re:PHP used to be an ASF project by NuclearDog · · Score: 1

      "$HTTP_POST_VARS, anyone?"

      A) This can be disabled if you really don't want it (see php.ini).
      B) I've found several scripts/sets of scripts that use this variable over $_POST, so having this available for backward compatibility is GOOD.

      --
      This statement is forty-five characters long.
    24. Re:PHP used to be an ASF project by wolrahnaes · · Score: 1

      "That said, the PHP developers do specifically state not to use Apache 2 in a production environment. I personally have not listened, though my server is not exactly used for a lot. ;^)"

      Add me to that list too. I run PHP5 + Apache2 on WinXP as my development machine, and PHP4 + Apache2 on Debian as my home server. Never had any problems with it.

      --
      I used to get high on life, but I developed a tolerance. Now I need something stronger.
    25. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      > development machine ... ome server

      You know, you might need some load before seeing threading problems. Servers that only get one hit at a time don't count.

    26. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      what is this 'girlfriend' you speak of?

      It's much the same as your landlord (or "Mom"), but you don't feel dirty when you fuck it.

    27. Re:PHP used to be an ASF project by djeddiej · · Score: 1

      Having some backward compatability may be a good thing, but there should be a time-imposed limit on how these tags/commands whatever should remain effective in the language interpreter, and it should be adhered to.

      Or else concepts like could still be used everywhere...god help us

      --
      just a web application developer and instructor in Toronto, ON Canada
    28. Re:PHP used to be an ASF project by Bert64 · · Score: 1

      I can't get mod_perl working with apache, the perl-status page gives "internal server error" and my perl scripts don't seem to be running through it. There doesnt seem to be anything in the logs to indicate why either

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    29. Re:PHP used to be an ASF project by Bert64 · · Score: 3, Interesting

      This would be a huge headache for people who provide webhosting tho..
      For instance, i am unable to upgrade my server to php5 because many customer code won't run correctly on it.. But before too long, we will have customers demanding php5 because their code doesn't work on 4..

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    30. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0
      Then you meet an even better girl whom you invest a lot of effort into impressing and you're sure they'll love her, but instead they say, "what was wrong with your last girlfriend?"

      Then you say, "It's none of your business who I choose to go out with." So, yes. Dating is a bad analogy here :)

    31. Re:PHP used to be an ASF project by steinnes · · Score: 1

      Yes, I believe this is the reason. I think people using the prefork apache2 mpm are mostly safe, and those who would use worker mpm might be in more danger. But I have encountered strangeness with php on my apache2 setup (using prefork mpm).

      An example of trouble I got, was that I had a Directory configuration for a certain directory, set up in httpd.conf so that it had a different base include_path than by default in php. At random this setting would get splashed into other directories, so you'd be loading a totally different page, on a different virtualhost on the same Apache2, server, and get some error like "mysql.inc.php not found in include_path, include_path is: ..." (Don't remember the error message specifically, but this is pretty much the gist).

      I fixed this by putting the settings instead into a .htaccess file in the directory of the project requiring the special settings, that seemed to fix it!

      But this hasn't kept me from running php with apache2.. but it's understandable if the PHP guys want to avoid alot of fuzz and mailing list posts about this sort of stuff, when they know they problem lies with them not being thread safe, and they're probably working, slowly, towards being so.

    32. Re:PHP used to be an ASF project by papercrane · · Score: 1

      I have a FAQ about this exact thing for this exact reason on my website.

      From the FAQ:

      The PHP Manual says not to use PHP and Apache2 in production. This is because of multi-threading issues. Some PHP libraries are not thread-safe and therefore can crash PHP. These errors are often not seen by smaller or low-traffic sites as they are due to race conditions in the libraries. If you want to use Apache2 with PHP and not have it crash, the recommendation is to use Apache2's prefork mode.

      See this thread on the php-general list for more discussion.

    33. Re:PHP used to be an ASF project by Nykon · · Score: 1

      are you able to set up virtual hosts running both versions?

      --
      "It's better to be a pirate then join the Navy"
    34. Re:PHP used to be an ASF project by colinleroy · · Score: 1

      I have php3 and php4 installed on a server. I think you can do that with php5 too. Of course, Apache should have a way to differentiate scripts versions; here *.php3 are handled py php3, *.php is for php4. You'd have to use .php5 or something...

      --
      blah
    35. Re:PHP used to be an ASF project by Bert64 · · Score: 1

      Well, then the users would have to rename all their files and modify the php code to point to different filenames, more hassle than patching their php code to work properly in the first place.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    36. Re:PHP used to be an ASF project by djeddiej · · Score: 1

      Or else concepts like could still be used everywhere.

      The word that was missing between "like" and "could" was BLINK, as in the BLINK tag as in <blink>BLINK</blink%gt;

      This should not blink
      --
      just a web application developer and instructor in Toronto, ON Canada
    37. Re:PHP used to be an ASF project by jadavis · · Score: 1

      Although they haven't stated any harms aside from it's an unproven platform, they haven't found any benefits, either. So they said why bother.

      Apache 2 was originally released with visions of a "perchild" MPM. What ever happened to that? That would be a real improvement for security on a name-based virtualhosting system. Is anyone working on it? Can I donate a little money to encourage its development somewhere?

      There is still no good way of doing several sites on the same server in a good way. The options, as I see it are:
      (1) Several instances of apache, each on a seperate IP. Administration difficult because of all the extra daemons.
      (2) Name-based virtual hosting with safe_mode php: works fine, but requires safe mode which breaks many apps and is cumbersome to work with. You can't do mod_perl without trying to find some way of restricting its access.
      (3) Suexec on ip based virtualhosts. Requires a lot of IPs, and CGIs are performance hogs (and also not what people are used to, and breaks many apps).

      This is a serious question. If you have any pointers please respond. Or even tell me a better place to ask, because I'm usually ignored.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    38. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      Yeah... except perl sucks.

    39. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      So being the genious you are you setup a proxy apache server with no php support on port 80. You put all the vhosts in this and have them simply forward to the real apache server running php4 on some other port or the real apache server running php5 on yet another port, and it all works transparently to your users. (obviously I've glossed over the details, and there are a few complications, but it can be done without too much hassle.)

      Whats the big deal?

    40. Re:PHP used to be an ASF project by Anonymous Coward · · Score: 0

      Just use mod_rewrite based on the customers virtual hosts

    41. Re:PHP used to be an ASF project by jusdisgi · · Score: 1

      Then you say, "It's none of your business who I choose to go out with." So, yes. Dating is a bad analogy here :)

      Oh, I don't know....it seems that several here (including me) have told the PHP devs "It's none of your business what version of Apache I choose to run my PHP apps on." The analogy seems apt enough.

      --
      Given a choice between free speech and free beer, most people will take the beer.
  2. apache2 is essential for Windows by hey · · Score: 2, Informative

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

    1. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 5, Funny

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

      Anyone still running Windows is nuts ;)

    2. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 1, Funny

      > Anyone still running Windows is nuts ;)

      Anyone who runs thru windows is nuts!

    3. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Anybody running ANY Apache on Windows is nuts...

    4. Re:apache2 is essential for Windows by einhverfr · · Score: 3, Informative

      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.

      --

      LedgerSMB: Open source Accounting/ERP
    5. Re:apache2 is essential for Windows by Kick+the+Donkey · · Score: 1
      Anyone who eats nuts is Windows!

      How much longer can we keep this joke going?

      --
      /. is a bunch of nerds at a million typewriters. It's not a political conspiracy determined to undermine your beliefs.
    6. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

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

      What, even if it's digitally signed?

    7. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

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

    8. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Running thru windows is liable to hurt your nuts.

    9. Re:apache2 is essential for Windows by Zorilla · · Score: 1

      Anyone who nuts on windows gets eaten!

      --

      It would be cool if it didn't suck.
    10. Re:apache2 is essential for Windows by KilobyteKnight · · Score: 4, Funny
      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.
      --
      When will Windows be ready for the desktop?
    11. Re:apache2 is essential for Windows by Zorilla · · Score: 1

      ..or not the boss.

      --

      It would be cool if it didn't suck.
    12. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

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

    13. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Nibble Windows nuts, before it nibbles yours!

    14. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

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

    15. Re:apache2 is essential for Windows by Randolpho · · Score: 2, Funny

      Anyone who windows these nutz is joking.

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
    16. Re:apache2 is essential for Windows by beaverbrother · · Score: 2, Insightful

      Anybody still running Apache1 on Windows is nuts. I think a better way to phrase it is: Anybody running Apache on Windows is nuts

    17. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Anyone still old and Korean is running Windows.

    18. Re:apache2 is essential for Windows by Nspace13 · · Score: 0

      anyone who nuts windows is ... umm ... eating sand and has lightning in their gonads?

      --
      steal this sig
    19. Re:apache2 is essential for Windows by Microlith · · Score: 1

      What would you prefer we run?

      IIS?

      Thanks but I'll run Apache.

    20. Re:apache2 is essential for Windows by marcello_dl · · Score: 1

      Anybody running windows on nuts is an apache.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    21. Re:apache2 is essential for Windows by rabbit994 · · Score: 2, Funny

      Actually, Windows 2003 IIS is quite nice. I know I'm going to get flamed and probably modded down but if your stuck on Windows 2003 (in particular) IIS 6 > Apache. Note, I've tested PHP on IIS 6 over Apache with PHP. IIS 6 was faster, more secure (assuming patched) and used less CPU. No, I didn't do any official study, that's was my findings personally. I found people who bitch about IIS 6 have either a. not used it or b. Are poor Windows admins or maybe both.

    22. Re:apache2 is essential for Windows by Marthisdil · · Score: 0

      Anyone still running Windows is nuts ;)

      Ahhh....more of the "I Hate Windows" rhetoric....seems like it's only a matter of time in every thread here...

    23. Re:apache2 is essential for Windows by iamlucky13 · · Score: 2, Funny
      Anyone who wants to keep this joke going is nuts.
      Anyone who is nuts will keep this joke going.
    24. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Umm what about SSL???? Apache 2.0 doesn't support SSL so no e-commerice. Apache 1 is still better for hosting all sites

    25. Re:apache2 is essential for Windows by Phisbut · · Score: 1
      What would you prefer we run? IIS? Thanks but I'll run Apache.

      He also said : Apache2 works way better on Windows.

      --
      After 3 days without programming, life becomes meaningless
      - The Tao of Programming
    26. Re:apache2 is essential for Windows by jacobcaz · · Score: 1
      • How much longer can we keep this joke going?
      In Korea, only old people who run Apache on Windows are nuts.
    27. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      I think I was using SuSE when I typed it up.

    28. Re:apache2 is essential for Windows by jd · · Score: 2, Funny

      Apache runs anybody on nuts through a window.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    29. Re:apache2 is essential for Windows by jd · · Score: 1

      Jokes who are nuts will reply to anyone.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    30. Re:apache2 is essential for Windows by Evil+Grinn · · Score: 2, Funny

      Anyone who wants to keep his nuts will use Apache2.

    31. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Any apache would eat nuts on windows

    32. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 1, Funny

      Mornington cresent Oh sorry wrong joke.

    33. Re:apache2 is essential for Windows by Evil+Grinn · · Score: 3, Interesting

      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.

      It all goes back to Windows NT being designed from the beginning to enourage the use of threads, while Unix always favored multiple processes.

    34. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Anyone running PHP with Apache is nuts, when you could be using Apache with Ruby instead!

    35. Re:apache2 is essential for Windows by hwyengr · · Score: 1, Funny

      In Soviet Russia, Windows nuts YOU!

    36. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Any apache who windows is running nuts

    37. Re:apache2 is essential for Windows by khendron · · Score: 2, Funny

      Anybody reading this far is now nuts.

      --
      Life is like a web application. Sometime you need cookies just to get by.
    38. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      I'm nutty!

    39. Re:apache2 is essential for Windows by swv3752 · · Score: 1

      But in Russia Apache runs Windows.

      --
      Just a Tuna in the Sea of Life
    40. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      I for one welcome our nut bearing windows overlords.

    41. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      But just as applicable

    42. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Nuts want to keep windows open.

    43. Re:apache2 is essential for Windows by Blender · · Score: 0

      In Soviet Russia, Apache on Windows is running YOU!

    44. Re:apache2 is essential for Windows by osu-neko · · Score: 1

      "Nuts." -- Gen. McAuliffe

      --
      "Convictions are more dangerous enemies of truth than lies."
    45. Re:apache2 is essential for Windows by NuclearDog · · Score: 1

      My apache 2 supports SSL...

      "Apache 1 is still better for hosting all sites"

      A) No.
      B) All generalizations are false.

      --
      This statement is forty-five characters long.
    46. Re:apache2 is essential for Windows by kayen_telva · · Score: 2, Funny

      Apache can run farther on nutz than windoze.

    47. Re:apache2 is essential for Windows by Fallen_Knight · · Score: 1

      ISS will use less CPU as (IIRC) parts of it are IN the kernal (VERY BAD) so there is less overhead.

      the reason to use apache over ISS is security. ISS is just not as secure with all patches in palce.

    48. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Why don't you learn how to spell it before giving us your worthless "IIRC" opinion.

    49. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Mainly I bitch about IIS because I have to spend money on it ;)

      I'd develop for IIS/ASP/.NET if I didn't have to spec in a boatload of cash for a Microsoft development environment. Does the IIS MSSQL link still require that bullshit Internet Connector middleware that essentially counts connections and won't let you go over your limit and is priced per connection?

    50. Re:apache2 is essential for Windows by Foolhardy · · Score: 2, Informative

      True, NT does favor threads vs processes as they are much lighter, but even more than that, NT favors a very small amount of threads running as asynchronous workers. NT inherited the heavily asynch IO model from VMS.

      On NT, instead of creating 64* threads (or whatever the maximum number of concurrent clients will be, possibly hundreds) where one thread waits on each connected client, it would be better to create about 1 thread per CPU and have them take work items off of a completion port. Instead of blocking on IO, always do it asynchronously and have the result posted as another work item.
      Both files and sockets can be connected to completion ports. Always have a pending read on open sockets so when a packet is recieved, the OS posts a work item.
      Client wants dynamic content but you have to read something first? Start the read now and immediately go back to waiting for another work item in case you could be doing something else in the meantime. When it completes, the OS will post it and you can finish the operation: do the necessary processing, start an asynch write of the result to the socket and go back to waiting for more work.
      Client wants a static file? Start the transfer with TransmitFile (it's like UNIX sendfile) and immediately wait for another work item.
      The only thing you should be blocking on are locks to synchronize multiple threads. Never IO.

      On a single processor machine, you might as well only have one worker thread since it should never be blocked except for lack of work: this means that nothing has to be threadsafe. The buggy PHP extensions could live in a happy single-threaded world without sacrificing any performance. Hopefully you can upgrade to better software if your server has multiple CPUs to take advantage of, or use one process per CPU.

      * Apache has to have 200 threads if I ever expected that many clients to connect at one time, just in case? Can't they at least be started dynamically? No wonder it doesn't perform well on Windows. I just hope they aren't used round-robin.

    51. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      I can top all of those:

      Apache Server, the Movie:
      starring Natalie Portmann, petrified in chunky peanut butter.

    52. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0
      Anyone still running Windows is nuts ;)

      Yeah, agreed. I mean seriously. I'm more the command-line old-school unix type myself, so I could understand why people who preferred the soft cozy feel of a polished GUI complained about linux - but hello? Linux now has awesome GUIs and drop-dead easy installation procedures for the technically inept. Installations that'll drop you straight into a desktop with Firefox, Evolution, OpenOffice, etc. Get with the program people - messing with license keys for your pirated piece of malware prone, crash-happy, virus targetted bloatOS is soooo 1990s!

    53. Re:apache2 is essential for Windows by Punboy · · Score: 1

      Dont do nuts, nuts are bad.

      --
      If you like what I've said here, and want to read more, go to http://www.krillrblog.com
    54. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      i have read this thread from top to bottom, now i'm just a bottom feeding nut.

    55. Re:apache2 is essential for Windows by rabbit994 · · Score: 1

      Your partly correct about IIS and being the kernel but alot less is in the kernel then you think. Apache on Windows can have a hard time being run as anything other then Administrator (i've done it before, it's just a massive pain in the ass) while IIS process and IIS anonymous users can be jailed easily by using NTFS permissions, IUSR, IWAM accounts. Some PHPbb security holes that were exploited on my IIS 6 box caused less damage because of that. They were jailed to that location and could only go running through there. Patch IIS 6 and it's no worse then Apache (who needs to be patched as well, since I set up an apache 1.3 box about 8 months ago I've patched it 4 times and patching Apache is slightly harder then patching windows which I've done about 4 times for IIS, more for various other stuff)

    56. Re:apache2 is essential for Windows by orasio · · Score: 1

      Any Apache2 nuts wants to keep.

    57. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      need a apache here my nuts is running

    58. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      I am on widndows with Apache 1.3 & it works just swimmingly. Other than a few minor changes in the way I do a few of the files over a unix based system (mainly in the .htaccess) I have just a fine experience with my current server. I've been testing Apache 2 sincie it was 2.0.49 & have been not over-joyed by many of the features it offers over that of 1.3. I also had better luck with PHP & MySQL on the Apache 1.3 engine over the earlier versions of 2.0.

      I am still trying to take the time to learn Unix & Linux but don't really have some of the time that some people seem to have at their disposal.

    59. Re:apache2 is essential for Windows by Anonymous Coward · · Score: 0

      Open nuts fly through windows in an Apache too.

  3. Perl vs PHP: The final showdown by Anonymous Coward · · Score: 0, Funny
    Let the battle commence

    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?

    1. Re:Perl vs PHP: The final showdown by Anonymous Coward · · Score: 0

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

    2. Re:Perl vs PHP: The final showdown by Alpha27 · · Score: 1

      The points brought up in the site you link are valid. It's one thing is someone were merely spatting out nonsense, but when they have valid points they can demonstrate, it's good to make note of it.

    3. Re:Perl vs PHP: The final showdown by halfelven · · Score: 1

      Perl is fine, with one exception: the "there's more than one way to do it" concept. Anyone suggesting to use such a language in any serious software project should be fired with prejudice.

      I actually mean it.

    4. Re:Perl vs PHP: The final showdown by IpalindromeI · · Score: 1

      Ok, let's assume your stance: there should only be one way to do something. Fine: anything that can be done, only one way to do it.

      In that case, there are only two positions you can be in:
      1) Anything you could possibly do has already been done once, so there's no use for you. You're out of a job.
      2) There are still some things left, but once you do them (or anyone else does), that's it, there's no use for you. You're out of a job.

      Don't be so obtuse. Programming languages are tools, not soapboxes.

      --

      --
      Promoting critical thinking since 1994.
    5. Re:Perl vs PHP: The final showdown by halfelven · · Score: 1

      Right, the either-black-or-white view, the hallmark of those who deem themselves intelligent but are merely able to accomplish some marginal and narrow task.

      It's bad when there's strictly one way to do it.
      It's a very good thing when there are just a few ways to "do it", chosen for valid reasons.
      It's a pathological case when the language chooses as primary goal to bundle heaps of different ways to "do it" just for the heck of it. Perl is like that.

      As for the two positions you mention: you mean there are jobs in the field of programming just because there are more ways to implement the same algorithm over and over? Don't be ridiculous!

    6. Re:Perl vs PHP: The final showdown by Xenna · · Score: 1

      Don't be silly. The guy actualy comes up with some good arguments. I use both Perl & PHP and I happen to agree with them. I'll keep using PHP, tho...

      As for the 'more than one way' argument, I've never met a programming language yet in which there wasn't more than one way to do things. There's more than one way to do things in PHP (thankfully).

      I think you guys are confusing programming with bookkeeping. You're wrong. Programming is an art and in art there's always another way...

      X.

    7. Re:Perl vs PHP: The final showdown by dsheeks · · Score: 1

      I guess the excludes C (and probably most other languages). You sure wouldn't want to write

      int i;
      for ( i=1; i=5; i++ ) {
      printf( "Hello, %d\n", i );
      }

      when you could write
      int i;
      i = 1;
      helloloop:
      printf( "Hello, %d\n", i );
      i = i + 1; /* Never used i++; !!! */
      if ( i 6 ) goto helloloop; /* No = operator needed */

  4. FUD in it's purest form ... by Sonic+McTails · · Score: 5, Informative

    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.

    --
    This signature was left intentionally blank.
    1. Re:FUD in it's purest form ... by Raxxon · · Score: 3, Interesting

      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.

    2. Re:FUD in it's purest form ... by Bruce+Perens · · Score: 2, Interesting
      So, why don't they put a lock around the PHP interface to those libraries? Or why don't they make thread-safe successors of those Free libraries that, presumably, they do have the power to edit?

      Bruce

    3. Re:FUD in it's purest form ... by Anonymous Coward · · Score: 0

      or, put your money where your mouth is and do it yourself, because that is what the PHP developers will say: "we didn't write these libs in PEAR, so it is up to the individual developers to make them thread-safe".

    4. Re:FUD in it's purest form ... by Anonymous Coward · · Score: 0

      if you change the MPM to prefork why are you using Apache2 in the first place

    5. Re:FUD in it's purest form ... by Matt+Perry · · Score: 4, Interesting

      Because v2 is more powerful. Filter chains for one. You can have the output routed through various modules and even shell commands before it's served up to the user. For example, if you want the output of a CGI to then go through server side includes expansion, then gzipped and served to the user. Apache 1.x doesn't have that kind of flexability.

      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    6. Re:FUD in it's purest form ... by JabberWokky · · Score: 4, Interesting
      Several of the libraries are commercial software interfaces. I have no idea how many (if any) are unsafe, but they are things like interfaces to Oracle, commercial layout software, etc.

      As for putting a lock around them, I'd imagine that when that happens, it would be considered thread safe *except*...

      PHP has a user contributed library system similar to CPAN called PEAR. Some of the libraries in PEAR aren't threadsafe... and even if somebody went through and updated them, next week there will be several new one that are not threadsafe.

      Now, all of this would be moot if there were a compelling reason to push to Apache2. The impetus would be there to do the work. But, right now, the last of the 1.x series is just as stable and performs as well as Apache2. That means that there's simply no reason to do the work, and Open Source doesn't like to do unnecessary work.

      When there is a benefit to the ongoing work necessary to make it and *keep* it threadsafe, it will likely be done.

      --
      Evan "And yes, I realize the irony of saying how Open Source works in this reply"

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    7. Re:FUD in it's purest form ... by baka_boy · · Score: 1

      If PHP may be loaded in a multi-threaded Apache server, and uses an extension module which depends on libraries which are not thread-safe, then the affected PHP module (and/or the underlying library) is broken, not Apache2.

      Really, people. This is like telling people not to switch from a 2.2 kernel to 2.6, because your app breaks under everything newer than 2.2.19 or something, and you can't be bothered to find out why and fix it.

    8. Re:FUD in it's purest form ... by Raxxon · · Score: 2, Insightful

      PHP to rewrite bzlib? zlib? OpenSSL? MySQL? MSSQL? Oracle?

      I don't understand what you're getting at here. There are a TON of libs that PHP can be compiled to use/support that are completely 3rd party, and if the 3rd party lib isn't thread safe, it doesn't matter HOW locked down PHP is there are still going to be issues. If the thread gets destroyed or exploited outside of PHP in one of these other libs, HOW is that PHP's fault?

      They made the statement that PHP on Apache2 was 'bad' because it would all roll back on them. This is mostly a CYA move on their part and one I don't blame them for taking. What I've read indicates that it works, but "Use At Your Own Risk" because they can't give a 100% guarantee that EVERYTHING is going to be safe. Look at it from the other end... different references for securing Apache2 have commented that if everything in your environment isn't thread-safe that there will be possible security and stability issues. The recommended approach is to ONLY use extension/modules/addons that are thread-safe. If we're saying that PHP is FUD'ing on Apache2 then almost all the securing Apache guides are FUD'ing all over ANYTHING that might not be 100% thread-safe that interfaces with Apache2. :p

    9. Re:FUD in it's purest form ... by NerdForChrist · · Score: 1

      Not to be picky, but...

      PEAR is a repository of stuff written in PHP. I believe you're thinking of PECL, which is extensions written in C. I suppose the misunderstanding could be due to the fact that PECL uses the pear installer.

    10. Re:FUD in it's purest form ... by Taladar · · Score: 1

      So, where is the problem. We simply use Apache 2 with one of the better scripting languages like perl, python or ruby that mysteriously manage to link against all the libraries you mention while at the same time they support threads.

    11. Re:FUD in it's purest form ... by hey! · · Score: 1

      Gee, this kind of thing always sounds very interesting and useful, but I've almost never seen it used for real.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    12. Re:FUD in it's purest form ... by Raxxon · · Score: 1

      Except that odds are, they'll tell you that while THEY are thread-safe, the external libs you link against may not be, etc, etc, etc.

      Same thing that PHP is doing, except PHP has gone an extra step and recommended against doing this for security reasons, which shows that they do understand that not everyone who's using their language is an actual geek who understands the security and system issues that could possibly arrise from this.

      Imagine the poor SOB who comes in every morning to find his Windows server BSOD'ed.... All he has is a MCSE that's not worth the paper it's printed on and the how-to that told him how to setup Apache2 with one of these languages..

    13. Re:FUD in it's purest form ... by JabberWokky · · Score: 1
      IIRC, PECL is part of PEAR? If not, it certainly appears as such because, as you note, it uses the same front end tools.

      My point remains valid, at any rate.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    14. Re:FUD in it's purest form ... by JabberWokky · · Score: 1
      Really, people. This is like telling people not to switch from a 2.2 kernel to 2.6, because your app breaks under everything newer than 2.2.19 or something, and you can't be bothered to find out why and fix it.

      No, it's like having a large software project that mostly works on the next version but there are sufficient third party portions that potentially break (some of which are commercial) and saying "it appears to work, but we haven't verified everything yet".

      Which is a pretty damn common note in changelogs no matter what software you're looking at whenever a major dependancy changes versions.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    15. Re:FUD in it's purest form ... by NerdForChrist · · Score: 1

      Your point is certainly valid. The relationship between the two is difficult to figure out (and this is coming from a PEAR develeoper!).

      I just wanted to give PECL a bit of publicity, because many people don't know that it exists.

    16. Re:FUD in it's purest form ... by someonehasmyname · · Score: 1

      Now, all of this would be moot if there were a compelling reason to push to Apache2. The impetus would be there to do the work. But, right now, the last of the 1.x series is just as stable and performs as well as Apache2. That means that there's simply no reason to do the work, and Open Source doesn't like to do unnecessary work.

      What happens when the Apache Foundation decides that they will no longer backport security patches into the 1.x branch?

      Everyone will decide Apache2 compliance is finally a good thing, and it'll be weeks before it's finally safe to use.

      I hope there are no exploits in Apache before PHP is ready.

      --
      Common sense is not so common.
    17. Re:FUD in it's purest form ... by Anonymous Coward · · Score: 1, Funny
      Open Source doesn't like to do unnecessary work.

      Tell that to the GNOME people.

    18. Re:FUD in it's purest form ... by Fallen_Knight · · Score: 1

      sounds like something you wouldn't see as a user and only as a site dev/admin...

    19. Re:FUD in it's purest form ... by ldspartan · · Score: 1

      Try to do effective Content-Encoding: gzip and SSL in Apache 1.3.x

      And no, PHPs horrible implementation of this with output buffering does not count (improper negotiation, etc.)

      That alone has pushed me to Apache 2.

    20. Re:FUD in it's purest form ... by JabberWokky · · Score: 1
      And all the headlines will read "Apache flaw still unfixed after several weeks". Down in paragraph 13 they might mention PHP.

      I don't think this will happen. Not only will it cast on Apache rather than PHP, PHP is the number one non-core module.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    21. Re:FUD in it's purest form ... by deek · · Score: 1
      • Gee, this kind of thing always sounds very interesting and useful, but I've almost never seen it used for real.


      Actually, I never even realised that Apache 2 had this ability. And to think that I was telling a friend of mine the other day, that if you use a cgi script, you can't use SSI as well. He wanted the ability to do that with his website.

      I told him he could replicate the SSI functions using his cgi scripting language. Geez, I could have told him to use Apache 2. In fact, I might just do that now ...
    22. Re:FUD in it's purest form ... by Anonymous Coward · · Score: 0

      how about stunnel + mod_gzip?

    23. Re:FUD in it's purest form ... by arkanes · · Score: 1
      I'm not really familiar with the Perl or Ruby interperters, but the Python interperter is fully threadsafe, including it's usage of all the libraries it links against. Arbitrary C extensions may not be, but all the standard ones are.

      What PHP is doing is NOT taking the extra step and instead throwing up thier hands and saying that they don't know if PHP is threadsafe, they aren't sure if they only use threadsafe libraries or use them in a threadsafe manner, and they don't feel like finding out, so don't use PHP in a threaded environment unless you're prepared to deal with problems. This is reasonable, because thread safety is hard and you shouldn't make guarantees about it unless you know what you're doing. But get it out of your head that this is some sort of proof of security consciousness on behalf of PHP. Honestly, considering PHPs desperate race to defeat sendmail as the king of all exploitable applications, I'm not really prepared to take ANY security statements from them seriously

      I also think it'd be nice of them to clarify WHY you shouldn't use Apache 2.0 with PHP ("Because PHP isn't designed to be used in a threaded environment and we aren't prepared to make guarantees about it's behavior under those circumstances") rather than a dismissive comment that makes it sound like a failing of Apache, which it is not.

    24. Re:FUD in it's purest form ... by Raxxon · · Score: 1

      The last statement I read about the Threadsafe issues with PHP and Apache2 said that PHP *is* threadsafe, but they couldn't say the same for ALL the libs they link against.

      If you compile PHP with *NO* extensions at all.. No MySQL support, no PCRE support, no pcntl support, etc, etc then it's safe to use, but MOST installs of PHP are needing access to MySQL, and probably a good number of the image functions (libpng, libjpeg, etc) so the warning is valid.

      PHP challenging sendmail as the king of sploit apps? Please put the crack pipe down, that's a race between BIND and Sendmail. :p Also, blaming PHP for the issue of security holes in software written in PHP (like the latest worm that's killing boxes via a hole in PHPBB) is like blaming C for all the security holes in Windows. The language was used, and yes some implementations/versions do have internal security issues... but most of the "PHP Security" issues I've seen as of late are issues with someone coding an app badly in the language, not a direct exploit against the language.

      Granted, it's early in the morning for me (who does work before 11am? Ugh!) and I haven't had my morning IV of caffeine so I could be forgetting something or a lot of somethings...

    25. Re:FUD in it's purest form ... by arkanes · · Score: 1
      There have been an enormous number of exploits for PHP. Granted, they are (generally) rapidly fixed, but then, so were sendmails. It's got an extremely unimpressive security record for a product where (at least) baseline security is enormously important. In addition to that, PHP's design and style encourages the use of unsafe constructs (this is much the same argument used against C, but C's tricks are generally well known and there's effective workarounds for them, PHP less so). It's not 100% fair to blame PHP for bad apps but it's design does encourage that sort of usage and I have to smack them for that. It's really easy to write horribly insecure web applications and it'd be nice if you could trust PHP to take care of the most obvious problems and discourage the obvious holes that it can't plug, like sql injection. How many holes have come because of problems with the functionality or use of PHPs stupid magic quotes?

      PCRE can be used in a threadsafe manner, as can most of the other libraries you mentioned. If PHP doesn't do it, that's fine, but it's a PHP issue.

  5. It's a threading issue by Bruce+Perens · · Score: 5, Interesting
    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

    1. Re:It's a threading issue by Anonymous Coward · · Score: 2, Insightful

      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.

    2. Re:It's a threading issue by TheTomcat · · Score: 5, Informative

      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

    3. Re:It's a threading issue by Pecisk · · Score: 1

      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.

      --
      user@ubuntubox:~$ stfu This server is going down for shutdown NOW!
    4. Re:It's a threading issue by markv242 · · Score: 2, Informative
      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.

    5. Re:It's a threading issue by Anonymous Coward · · Score: 0

      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.

    6. Re:It's a threading issue by Bruce+Perens · · Score: 5, Informative
      No problem with the respect, this is an area in which I don't have tremendous expertise. But I submit that if PHP itself is in charge of its interface to a non-thread-safe library, it can put a lock around calls into it - effectively single-threading each library and that would perform at least as well as going to a less efficient threading model for apache, and potentially better depending upon where contention happens. And given that this is Free Software, thread-safe successors of those libraries can be developed.

      Bruce

    7. Re:It's a threading issue by EnronHaliburton2004 · · Score: 2, Interesting

      And then you lose much of the benefit of Apache 2.

      I don't understand.

      Are the PHP developers not recommending Apache 2 because it is harmful to upgrade? Or are they not recommending Apache 2 simply because there really aren't any benefits to upgrading.

      Upgrading (and rolling back an upgrade) Apache has always been pretty simple, and it's pretty easy to have a 1.3 Apache running alongside an Apache 2.0.

    8. Re:It's a threading issue by pthisis · · Score: 4, Informative

      Most of the benchmarks I've seen for Apache 2.0 on linux have been pretty ambivalent; the prefork MPM is generally better at ramping up to handle large numbers of connections, and serves more reqs/sec under high load, while the worker MPM serves large numbers of requests to small numbers of connections more efficiently. But those numbers seem to fluctuate based on the application and the number of processors used, and I've seen some applications where one model was nearly twice as efficient as the other--and I've seen that big a difference work in favor of both models, for different apps (which probably points to some MPM-specific design decisions in that particular application).

      As always, the decision over whether to use threads or processes should be based primarily over whether you want to give up protected memory within your application or not (unless you're dealing with a platform like Windows where the process model simply isn't flexible enough to avoid throwing memory protection out the window).

      --
      rage, rage against the dying of the light
    9. Re:It's a threading issue by Bruce+Perens · · Score: 5, Informative
      It's because there are potentially random problems because of two threads writing the same data at the same time. Code that depends on the value of a global variable not changing from one line to the next might break. Imagine that you increment a variable and then assume that its value is one greater than before, but it's really two greater.

      To their defense, the PHP folks say the problem is with libraries they don't control. But there could be a thread-safe PHP interface to them.

      And I guess the bottom line is that they don't want to keep answering questions about this, so they just say don't upgrade to Apache 2.

      Me, I use Zope. I think it's always been multithreaded.

      Bruce

    10. Re:It's a threading issue by bani · · Score: 1

      but then people would actually want to use apache 2.0, and we can't have that now can we?

    11. Re:It's a threading issue by rho · · Score: 2, Interesting
      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.

      As I recall, an old benchmark showed that a 486 running Linux and Apache could saturate a T1 serving static content. I'm not sure what benefit a "static content" metric has to any discussion concerning modern Web technologies. If static content is your problem, there are gobs of Web server solutions, such as that old kernel HTTP server, whatever it was called. Threading, pre-fork, blah blah blah--it's all gobbledy-gook when you're talking serving plain-jane HTML files.

      I think Apache solved the problem too well with the 1.3 branch. It's a robust, fairly clean solution to serving Web content, either static pages or some degree of dynamically-created Web application. If you need to do either, or somewhere in between, Apache 1.3 is a decent solution. The way I see it, if Apache wanted to differentiate their 2.0 branch, they could have gone either one or both of these routes: 1) build it with the intention of catering to the Web application market; or 2) build it with the intention of catering to the Web hosting business.

      With 1), the core problem of dynamic Web sites is the glue between a database and the HTTP server. Quite a lot of Web sites would be equally well-served by a lightweight HTTP server on top of a relational database. Something like Oracle's IAS, but... not. If Apache 2 could offer something like that, then they would have something to offer Web application developers. (And, incidentally, create a new market the way Tomcat/Java servlets did and thus a stable base of users.)

      With 2), there's a lot of work done by companies such as PSoft and Ensim to provide a facility for hosting several Web sites from a single IP address, and allowing those Web sites to have some control over their site. If Apache 2 could offer some method for improving this situation--"how" I leave as an exercise for the reader--then they would have something to offer hosting companies. (And, incidentally, create a whole raft of adopters as most people who buy Web space at a hosting company for $29.95/mo, or whatever, don't give a fig for what HTTP server is running behind their site.)

      As-is, Apache 1.3 can do both 1) and 2) good enough, and as we all know, good enough is good enough. Everybody will eventually move to 2.0, if only because RedHat stops supporting 1.3 in their up2date utility. I don't think there will be a mass exodus to Apache 2.0 for any technical reason, like the movement we see today towards FireFox from IE, because Apache 1.3 isn't a complete piece of shit. It's pretty good, as a matter of fact, and that Apache 2.0 isn't exactly bursting with new, revolutionary ideas that can change the world, the change will come slowly and quietly, until one day you'll sit up in bed and wonder, "Whatever happened to Apache 1.3?"

      --
      Potato chips are a by-yourself food.
    12. Re:It's a threading issue by Matt+Perry · · Score: 1
      prefork works fine, but is just not officially supported
      Can you back up this assertion?
      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    13. Re:It's a threading issue by Anonymous Coward · · Score: 0

      As always, the decision over whether to use threads or processes should be based primarily over whether you want to give up protected memory within your application or not

      You raise an excellent point. If the data you are serving up is highly sensitive then you are better served by the forking model which has a process wall between the data in your HTTP connections. You never know what kind of bugs a module will exhibit in a multithreaded scenario.

    14. Re:It's a threading issue by Anonymous Coward · · Score: 0

      Is everything this guy says automatically "+5 informative" just because it's him saying it? Man, oh man, I'll bet he has his choice of Slashdot Bois giving him blow jobs!

    15. Re:It's a threading issue by TheTomcat · · Score: 1

      Not officially. (-:

      Anecdotally, I've been using Apache2 in prefork mpm for over a year.

      S

    16. Re:It's a threading issue by Anonymous Coward · · Score: 1, Informative

      As much as I respect you after meeting you at the NC Biotech center in May of 97(?), I think you need to think that through completely. I've tried this with a site so I could use an old version of pdflib. Performance was a major problem. If you have only a single Apache thread that can access an often used library function at a time, you have a bottleneck. With multiprocess servers, that isn't a problem. The original UNIX process model works well and is simply safer.

    17. Re:It's a threading issue by Sweetshark · · Score: 1

      As projects such as thttpd, tux, boa, lighttpd and many others clearly demonstrate.
      Has anyone expierence using one of these as a proxy infront of zope?

    18. Re:It's a threading issue by Anonymous Coward · · Score: 1, Insightful

      > As I recall, an old benchmark showed that a 486 running Linux and Apache could saturate a T1 serving static content.

      Static content is trivial for any webserver, and T1's are a piddly 1.544 megabits. I could probably write a webserver in shell script reading a line at a time and redirecting the output to netcat and still saturate a DS-1 (T1).

    19. Re:It's a threading issue by Dysan2k · · Score: 0, Troll

      Do you have a reference for setting locks around non-thread safe libraries. Code examples work decently, but I'm interested in both the conceptual and applied methods.

      I know a fair number of the libraries that PHP links against are thread safe, and personally I've never run into a problem running Apache 2 + PHP4, but I also only utilize a handful of modules, so I simply have not run into the case of a problem from the threading.

      I can see where linking against commercial libs could be problematic (Sybase, Oracle, Informix) where there is NO chance of ever getting past the API, but I think a lot of people use MySQL and PostGRESQL (those poor, poor bastards) with PHP, not so much with the high-end commercial apps (though they would have to exist.) I'd personally like to see the PHP Foundation go ahead and state "Unless you are using X, Y, or Z; threading should/is safe and Apache 2.x is supported." I use a fair number of SuEXEC and mod_rewrite rules, so I require the added features in 2.x. 1.x is no longer an option, so I stick with what works better.

      --
      -What have you contributed lately?
    20. Re:It's a threading issue by Anonymous Coward · · Score: 0

      anyone that uses libpdf is a fool.

      fpdf is just as good, 100% free and open and certianly a better choice and portable.

      oh and it works perfectly with apache 2.0

    21. Re:It's a threading issue by pthisis · · Score: 4, Informative

      You raise an excellent point. If the data you are serving up is highly sensitive then you are better served by the forking model which has a process wall between the data in your HTTP connections. You never know what kind of bugs a module will exhibit in a multithreaded scenario.

      Absolutely. But it's not merely protecting sensitive data--OS architects worked hard for years to implement protected memory, and threads circumvent a lot of those gains (a bug in one thread can affect them all, all memory access needs to be synchronized, etc).

      There are good times to use them, but the choice should be based on whether you need to share all (or most) of the memory as opposed to sharing little or none (when processes, possibly with shared memory segments, are the correct choice).

      Too many people think that somehow "threads are faster" when (excepting egregious disparities a la Windows) that isn't necessarily true--and even when it is, the performance benefits are often tiny compared to the costs you pay.

      --
      rage, rage against the dying of the light
    22. Re:It's a threading issue by killjoe · · Score: 1

      According to this article php with fastcgi is an very performant option under IIS. Perhaps the same should be tested for apache2.

      --
      evil is as evil does
    23. Re:It's a threading issue by fimbulvetr · · Score: 1

      You're obviously no admin if you're talking about an app kill-9ing itself.
      That's the worst thing that could possibly happen, I've had juniors work for me trying it, it took me a few times to figure out why the server kept crashing.

      Kill-9ing does not always clean memory, open files, sockets, etc.

      Kill-9 on my systems, and suffer my kill-9.

    24. Re:It's a threading issue by Bruce+Perens · · Score: 1
      Well, for every library you establish a separate lock. Every time you enter that library, take the lock. When you return from a call to the library, release the lock. Do this in each and every call that PHP can make to the library. The POSIX locking facilities would be adequate. This would guarantee that there would be no concurrent accesses to the library.

      Bruce

    25. Re:It's a threading issue by MenTaLguY · · Score: 1

      That doesn't help if the library keeps state in static storage, rather than passing "context" objects as parameters.

      --

      DNA just wants to be free...
    26. Re:It's a threading issue by Baki · · Score: 1

      I couldn't agree more, wish I had mod points this time. I've been trying to convince people for years of this. I think MSFT marketed the thread model as one of the big benefits in WinNT, in a complete reversal of the last 20 years of software architecture progress :(.

    27. Re:It's a threading issue by sid6581 · · Score: 1

      It does help if the only way that state is changed is through library calls (which is likely if it's not thread safe -- if they're using threads internally they should lock the state data). If you always make the calls in the context of a lock there's no way another thread could call another function and modify the state at the same time.

    28. Re:It's a threading issue by Anonymous Coward · · Score: 0

      If the library is keeping context across unrelated server requests it wouldn't work anyway, even in apache 1.3

      So if you need to call several library entry points in the scope of processing a single HTTP request you just hold the lock until you're finished.

      Note that you'd also need a way to mark extensions as "threadsafe" -- common extensions which demand high-performance that we know are threadsafe can thus avoid all this.

    29. Re:It's a threading issue by MenTaLguY · · Score: 1

      Right; my point is simply that there's no simple automatic process to doing this.

      --

      DNA just wants to be free...
    30. Re:It's a threading issue by Anonymous Coward · · Score: 0

      So who's volunteering to profile every library extensively until they identify any and all obscure threading problems? If it were as easy as you're suggesting, it would have been done long ago.

    31. Re:It's a threading issue by sid6581 · · Score: 1

      Of course it's not automatic, but it would work fine. There's nothing to it, it's just tedious.

    32. Re:It's a threading issue by keesh · · Score: 1

      Are you the real Bruce Perens?

    33. Re:It's a threading issue by Trepalium · · Score: 1
      It doesn't matter if the state is only changed through library calls or not. A giant lock around each call prevents the most obvious crashes of a non-threadsafe library, but there are plenty of other non-obvious problems that could (and likely do) exist. Any library that changes C 'static' variables, or variables stored within the image of the library will be unsafe. Imagine this scenario.

      1. Thread A calls SetMode(2)
      2. Thread B calls SetMode(10)
      3. Thread A attempts operation that requires Mode 2.
      The only fixes would be for thread A to block any access to the library until the script exits (good bye performance), or to try and load the library multiple times (which has problems of it's own, especially for the non-PIC cases). Frankly, there's no good solution to this problem.
      --
      I used up all my sick days, so I'm calling in dead.
    34. Re:It's a threading issue by sid6581 · · Score: 1

      If there's only one mode available at a time, you couldn't run two scripts concurrently anyway. Even in a non-multithreaded environment you'd have to be careful that the mode is what you expect it to be.

      In a multithreaded environment you could still use this library, you'd just have to keep the lock longer -- you need to keep it as long as you rely on the mode being what it is, to prevent another thread from changing it underneath you.

      This makes it more complicated since you may have to use other locks within the same scope, so you need to be more careful. However, it's really no different. Locking the library will still work.

      Unless you're using synchronous I/O and handling only one connection at a time, such a library will be a pain to use even if you only have one thread.

    35. Re:It's a threading issue by Fallen_Knight · · Score: 1

      yea, my CMPT 300 teacher wnet on and one about threas being 100s of times faster then processes... i was half tempted to stamd up and call him on it.

      sure on windows processes are fucking slow and threads are fast.

      But,iirc, under linux thread/process are pretty much the same thing except 1 has shared memory.

    36. Re:It's a threading issue by Foolhardy · · Score: 1
      (unless you're dealing with a platform like Windows where the process model simply isn't flexible enough to avoid throwing memory protection out the window).
      I know that creating a process is considerably more expensive than creating a thread in Windows NT (mostly because you have to wait for the Win32 server; non-Win32 processes are much faster), but I wasn't aware of any limitations that prevent proper memory protection. New processes get their own address space. Shared memory is accomplished with sections, which can be mapped read only.
    37. Re:It's a threading issue by Anonymous Coward · · Score: 0

      If there's only one mode available at a time, you couldn't run two scripts concurrently anyway. Even in a non-multithreaded environment you'd have to be careful that the mode is what you expect it to be.

      No, in a forked environment there'd effectively be one copy of the library per process (albeit sharing a code segment) with disjoint data segments and hence state.

    38. Re:It's a threading issue by dfj225 · · Score: 1

      I wouldn't say that threads are faster but I do think it is fair to say that they have less overhead so you can many more threads on a system than you can processes. At least, this is what comes to my mind first when comparing threads to processes.

      --
      SIGFAULT
    39. Re:It's a threading issue by pthisis · · Score: 1

      Win32, at least last time I checked, didn't support COW fork(), and even doing COC fork() required a lot of hacks. The spawn family of calls conflates fork and exec. Without fork-only, you wind up using threads to work around the issue.

      --
      rage, rage against the dying of the light
    40. Re:It's a threading issue by pthisis · · Score: 1

      I wouldn't say that threads are faster but I do think it is fair to say that they have less overhead so you can many more threads on a system than you can processes

      Except that that's not really true. If your processes actually write to a lot of pages, then they will have higher overhead--but they'll also be doing more than threads would. If they don't, then the higher overhead is basically limited to PTE mappings. In practice, thousands of processes or threads isn't a problem on modern OSes, except that it probably indicates an extraordinarily inefficient design.

      --
      rage, rage against the dying of the light
    41. Re:It's a threading issue by dfj225 · · Score: 1

      Well, correct me if I am wrong, but what I was thinking is that there would be more overhead when creating a process compared to creating a thread. For instance, it would be quicker (less overhead) to create a few hundred threads rather than processes.

      --
      SIGFAULT
    42. Re:It's a threading issue by pthisis · · Score: 1
      Well, correct me if I am wrong, but what I was thinking is that there would be more overhead when creating a process compared to creating a thread. For instance, it would be quicker (less overhead) to create a few hundred threads rather than processes.


      This actually varies based on which threading library you're using (in some, pthread_create is slower than fork), but if you're talking about bare clone() it's true.

      It's also kind of irrelevant since the cost of either is extremely low (you can create tens of thousands of processes per second on modern machines) and, more importantly, isn't that important--if you care at all about performance, you're going to be pooling your threads or processes, not constantly creating new ones all over the place. So the creation cost will be amortized heavily.
      --
      rage, rage against the dying of the light
    43. Re:It's a threading issue by Foolhardy · · Score: 1

      NT itself has no problems with a normal copy on write fork; a call to NtCreateProcess with the SectionHandle argument set to 0 will cause the new process to inherit its address space from InheritFromProcessHandle, and you can specify copy on write access. The POSIX (or SFU) subsystem has no problems doing a real fork.

      I guess the closest you can get using only Win32, is to make all the memory you want inherited in shared sections and have the child map it copy on write at the same addresses. This requires a different style of creating children, but will work just as well; not bad, just different. I think that Cygwin does something similar, although it doesn't set good security on the sections.

      If a COW fork() is just a normal fork, what's a COC fork()? clone() perhaps?

    44. Re:It's a threading issue by pthisis · · Score: 1

      COC = copy-on-create, the entire memory is copied (except maybe shared lib mappings). I'd call COC "normal", given that it came first. Though COW is certainly prevalent today, so you could coherently argue that it is "normal". So I guess I'd avoid that tag entirely.

      COC is how Cygwin did fork() last time I checked, but I haven't looked at it recently... ...Okay, after some googling it looks like NTCreateProcess is (or was) an undocumented NT internal call. The cygwin guys discovered it in 2002, but want to have a single binary for all systems (Win9x included) so they don't use it. They don't even offer a configure option for it, which is extremely weak. Apparently there have been a number of arguments about this on the Cygwin mailing lists.

      --
      rage, rage against the dying of the light
    45. Re:It's a threading issue by Angst+Badger · · Score: 1

      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.

      For serving static content, thttpd absolutely blows both versions of Apache away, so I'm not sure what theoretical limit you're talking about, but perhaps that theory needs some revision.

      Don't get me wrong; I think Apache is great, and I've used both 1.x and 2.x successfully with PHP, but if all you're doing is serving static content, Apache is absolutely the wrong tool for the job.

      --
      Proud member of the Weirdo-American community.
    46. Re:It's a threading issue by tsmoke · · Score: 1

      > Me, I use Zope. I think it's always been multithreaded.

      So you /really/ don't give a shit about scalability. Fair enough.

  6. Multi-thread... by allanw · · Score: 2, Insightful

    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..

    1. Re:Multi-thread... by chtephan · · Score: 1

      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.

  7. Move along, nothing to see... by Saeed+al-Sahaf · · Score: 0
    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...

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Move along, nothing to see... by Anonymous Coward · · Score: 0

      Sure. When. Never?

  8. No need to switch ... by Anonymous Coward · · Score: 5, Interesting

    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".

    1. Re:No need to switch ... by garcia · · Score: 2, Insightful

      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.

    2. Re:No need to switch ... by realdpk · · Score: 1

      Totally agreed here. Apache 1.3 is quite good. What's the point of updating?

      As far as I've heard, the #1 "feature" enhancement from Apache 2.0 was "threading". I've also heard that there's no benefit to using it, and in fact, it's worse off with it.

      I didn't hear it from the PHP folks, though, so if it's FUD... :)

    3. Re:No need to switch ... by rbowen · · Score: 2, Interesting

      Right ... and, like I said (I thought, pretty clearly) I'm not saying that everyone should switch. I'm merely asking for the PHP website to stop discouraging migration for those folks who do have reasons for doing so.

      I know, suggesting that Slashdot might be misinterpreting my words is close to heresy ... ;-)

      --
      Apache guy, Open Source enthusiast, runner
    4. Re:No need to switch ... by Khazunga · · Score: 1
      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.
      It's natural, and it's a good thing. OSS, when it fullfills the needs of most users just stabilizes. It doesn't enter the bloat cycle to promote upgrades.
      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).
      If you have very large numbers of processes, the O(1) scheduler alone is enough of a reason. For personal use, I find the low latency quite a good reason to change.
      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.
      Filtering the output through various modules was the killer reason for my switch. With apache2, you can get content produced by mod_php compressed afterwards by mod_deflate. mod_deflate is much much better than the solutions integrated in PHP (bug-less content negotiation).

      As for stability, the PHP team assumes the only problem is with threaded models. Just opt for a prefork MPM and you're done.

      --
      If at first you don't succeed, skydiving is not for you
    5. Re:No need to switch ... by Anonymous Coward · · Score: 0

      I agree as well. Apache 1.3 works great. However, I do not agree that PHP itself is the problem here or even needs to stop discouraging users.

      If PHP were to do that and then PHP applications break, who's to blame? Not Apache2. PHP will be blamed and then it's going to lose ground or people will simply just stay upset. That's not going to solve anything. The Apache2 teams needs to get off their ass and make things work better with PHP if they want PHP to push their software. I thought the issue here was clear as day, but apparently not. End of discussion.

    6. Re:No need to switch ... by Dan+Ost · · Score: 1

      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).

      I ran 2.4 until I finally had a machine I wanted to configure sound on. After
      migrating that machine to 2.6, I'm not going back since it seems to add new
      life to my old hardware (low latency and better I/O handling).

      That, and it's much easier to configure the kernel with the new organization
      of options in 'make menuconfig'.

      --

      *sigh* back to work...
    7. Re:No need to switch ... by garcia · · Score: 1, Funny

      If you have very large numbers of processes, the O(1) scheduler alone is enough of a reason. For personal use, I find the low latency quite a good reason to change.

      I suppose it depends on what you use the machine for. Linux isn't ready for the desktop so I don't run a GUI on it. Thus I really have no latency issues running maild/httpd/sshd/etcd.

    8. Re:No need to switch ... by Saeed+al-Sahaf · · Score: 2, Funny
      I run a FreeBSD server with Apache 1.3.33

      One 3 too many, and one 7 short of 1337! Work on it. Maybe install Slack or something...

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    9. Re:No need to switch ... by Anonymous Coward · · Score: 0

      > I know, suggesting that Slashdot might be misinterpreting my words is close to heresy ... ;-)

      String him up with Cat5 and BURN the filthy heretic!!

      --

      Taco

      PS. Cowboyneal has just popped down the road to buy some gas.

    10. Re:No need to switch ... by Khazunga · · Score: 3, Insightful
      I suppose it depends on what you use the machine for. Linux isn't ready for the desktop so I don't run a GUI on it. Thus I really have no latency issues running maild/httpd/sshd/etcd.
      :-)))) I'd moderate you funny if I hadn't commented yet. My desktop is linux for three years now.

      Hint: Don't wait until the media says linux is desktop-ready.

      --
      If at first you don't succeed, skydiving is not for you
    11. Re:No need to switch ... by kelnos · · Score: 1

      Um, if PHP apps break because the PHP devs can't handle writing good code, how is this Apache's fault?

      It's a moot point, as the PHP devs maintain that mod_php itself is thread-safe, but may link to various extension libraries that may or may not be thread-safe. This is neither Apache's fault nor PHP's fault. Apache2 can be run in 1.x-style non-threaded mode, so there shouldn't be any compatibility problems. If there are, then that's surely the fault of PHP, not of Apache.

      --
      Xfce: Lighter than some, heavier than others. Just right.
    12. Re:No need to switch ... by Eil · · Score: 1


      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?

      Supported software. Apache 1.x is legacy code. Use it while you can, but you're really only putting off the inevitable switch to 2.x. Maybe this is your preference, I dunno. But I'd rather switch now so I don't have to rush through a conversion when my applications finally break or get hacked... and users/boss are jumping down my throat to hurry up and get it switched over.

      This must be a tricky political situation for Apache. PHP users are some of their main customers so if ASF declares one day that 1.x will receieve no further bugfixes, the PHP crowd would likely fork Apache. (And from the looks of it, they just might anyway.) On the other hand, they really want to push Apache 2.x to the forefront because it's so much more powerful. They want to focus on making Apache 2 even better rather than constantly patching up the latest 1.3.x vulnerabilities.

    13. Re:No need to switch ... by Anonymous Coward · · Score: 0

      Let's see ... that would bring you a web server that's actually supported and updated once in a while. Think security issues? Oh, wait... you use it to run PHP. Eh, just forget what I said...

  9. The site appears to be struggling by Sonic+McTails · · Score: 1, Informative

    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?

    --
    This signature was left intentionally blank.
    1. Re:The site appears to be struggling by UnknowingFool · · Score: 1

      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. :)

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    2. Re:The site appears to be struggling by ocularDeathRay · · Score: 0

      OW!!!! I think I pulled my eye muscle on that one!

      --
      Obama is a twitter sock puppet
    3. Re:The site appears to be struggling by dingfelder · · Score: 1
      ouch. that was painful to read. im going to help everyone else to stop the eye strain:
      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?


      from someone who enjoys documentation, that was painful :P
  10. A solution looking for a problem. by Anonymous Coward · · Score: 1, Interesting
    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.

    1. Re:A solution looking for a problem. by davegaramond · · Score: 1

      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.

    2. Re:A solution looking for a problem. by Anonymous Coward · · Score: 0

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

      Exactly what features do you think they should add? What would make you want to switch? As far as I can tell, Apache 2 is just Apache reworked to fix all of the problems everyone had with Apache 1. It also is the current development branch, so anything they change is going to change on 2, and might change on 1. You comment as though you think the Apache development team is trying to convince you to switch. The last I heard, they don't care if you switch or not, just understand that 1.0 is going to be ignored more and more as time goes on. The PHP docs state that 2 is crap, and should not be used with PHP. They don't seem to know what they are talking about though, as PHP works fine with Apache 2, if configured to turn off threading. If I had to guess, I'd say they are pissed that a default config does not work with PHP, and are thus acting like spoiled brats.

    3. Re:A solution looking for a problem. by Anonymous Coward · · Score: 0
      But threads are one particular implementation detail, and not really a problem in their own right.

      Back when 200MHz servers were popular, I almost think that performance argument held some weight -- but in the day of 3Ghz servers, it's not the proccess-creation overhead so much as the bloated PHP/database code itself that slows servers down.

      Yes, with Apache2 I can serve more PHP-Hello-World pages --- but in our database backed app, this difference vanishes in the noise.

    4. Re:A solution looking for a problem. by Anonymous Coward · · Score: 0

      per-child is officially dead. metux mpm might provide a solution at some point. suexec with cgi is the only way around that particular problem right now.

    5. Re:A solution looking for a problem. by Anonymous Coward · · Score: 0

      Not really. Apache 1.3 is a beautiful way around the problem.

    6. Re:A solution looking for a problem. by Lamieur · · Score: 0

      metux mpm is in a state similar to perchild. It conflicts with mod_ssl, it breaks on persistent connections, it's untested, unfinished, unmantained. I'm on their mailing list, but there haven't been any traffic since months and months now. Instead, people are using a patched Apache with a patched Linux kernel, but I haven't heard of any Linux distro supporting such crazy combo. I'm using Apache 2.0 for various reasons, but I know one reason not to switch from 1.3: mod_bandwidth (I use "real" virtual hosts with separate IP addresses for sites that need bandwidth limits, but with Apache 1.3 this was so much simpler...).

    7. Re:A solution looking for a problem. by davegaramond · · Score: 1

      You might not consider speed as a problem, but many other sites do. "Providing a worthy alternative to IIS on Windows (including speed-wise)" is very much a valid problem. Oh and not all requests are database heavy dynamic pages. Images, static HTML files, redirections, 304 responses, etc.

  11. Been using PHP4 and Apache2 for a Long Time by brandonp · · Score: 1

    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!

  12. a bit thin? by ckuhtz · · Score: 1
    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.

    --

    Poof.
  13. I'm sorry Bruce, you'll have to come back later. by Mr+Guy · · Score: 5, Funny

    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?

  14. I have no reason to switch. by dangermen · · Score: 1

    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.

    1. Re:I have no reason to switch. by snipersock · · Score: 2, Insightful

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

    2. Re:I have no reason to switch. by Anonymous Coward · · Score: 0

      If I have a design that is solid and I do not have performance requirements,... why? Why push an upgrade when one is not necessary? A secure stable environment is always better than a buggy high performance environment. I'll take Apache 1.3 qualities over 2.0.

    3. Re:I have no reason to switch. by Anonymous Coward · · Score: 0
      as it is NOT as tested as 1.3.

      You're not as old as I am, either. This isn't likely to change for a long time. Does that mean I'm better than you, and always will be?

      Your argument is as useful. 1.3 will always have more "test time" on it. But by your argument, everyone should revert back to 1.2, because it obviously has more "test time" than 1.3. I think 2.0 has been tested enough for any reasonable application. You can go to Netcraft and find any number of major sites that trust it.

      You may not have any reason to upgrade, but you need to rethink that particular reason not to.

    4. Re:I have no reason to switch. by DogDude · · Score: 1

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

      Or it could bring down your business. But hey, new=neato!, right?

      If you're just dicking around (ie: your web site), then sure. If you kill your web server, no big deal. Nobody's effected. The thing is that some people actually rely on their software, and it is bad if their software fails for whatever reason (especially because of an unnecessary upgrade).

      --
      I don't respond to AC's.
  15. Why are there two?? by jdavidb · · Score: 5, Insightful

    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.

    1. Re:Why are there two?? by jdew · · Score: 2, Informative

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

    2. Re:Why are there two?? by Anita+Coney · · Score: 0, Offtopic

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

      Yeah, big deal. So are the elections.

      --
      If someone says he and his monkey have nothing to hide, they almost certainly do.
    3. Re:Why are there two?? by Anonymous Coward · · Score: 1, Interesting

      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.

    4. Re:Why are there two?? by Anonymous Coward · · Score: 5, Informative
      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 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'.

    5. Re:Why are there two?? by rbowen · · Score: 5, Informative

      It's very simple. We want people to move to 2.0, but since people have not done so, we're not going to leave them high and dry.

      --
      Apache guy, Open Source enthusiast, runner
    6. Re:Why are there two?? by coopaq · · Score: 0, Insightful
      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?

      You see... Unlike Windows 95 and Windows 98, the open source community likes to keep supporting their released products.

      Especially when they are GOOD products that millions of people are using.

    7. Re:Why are there two?? by jdavidb · · Score: 5, Insightful

      I have no problem with that policy at all. But there is nothing at all on the front page to answer the question "Which Apache version should I use?" Even if the answer is not a simple "Use 2.0" or "Use 1.x," there needs to be answers to "Why would I want to use 2.0" and "Why would I want to use 1.x."

      I have been interpreting the continued maintenance of the 1.x line for years as a statement that 2.0 was not ready for prime time. I'm pretty sure this was the case at one time. The website needs to just come right out and say, "If you are starting with Apache for the first time, please use 2.0. The 1.x branch continues to be maintained for existing users who need to remain with an older version." Couldn't that at least make it to the FAQ?

    8. Re:Why are there two?? by Anonymous Coward · · Score: 1, Interesting

      I have been interpreting the continued maintenance of the 1.x line for years as a statement that 2.0 was not ready for prime time.

      Heck, it doesn't help that they have an "alpha" 2.1 line, that makes the 2.0 line feel even more like its in beta testing.

    9. Re:Why are there two?? by Anonymous Coward · · Score: 0

      It's very simple. We want people to move to 2.0, but since people have not done so, we're not going to leave them high and dry.

      We're just waiting for Apache 2.0 to be included in Debian stable. Don't hold your breath waiting for me!

    10. Re:Why are there two?? by Fallen_Knight · · Score: 1

      i think its simple enough to say "if you don't know if you need 1.3 you don't need 1.3" and to use prefork MPM with 2.0 if you use PHP or non-threadsafe libs.

    11. Re:Why are there two?? by LurkerXXX · · Score: 1
      Some folks won't move to the 2.0 series.

      For instance, the OpenBSD project folks place a lot of importance on the licensing of software. They won't use any 2.0 series Apache software. The 1.x series has a much more open license. In the 2.x series they added other specific requirements about certain patent termination cases, etc. That makes it not entirely GPL/BSD compatible.

    12. Re:Why are there two?? by qbwiz · · Score: 1

      Linux kernel 2.0.* is still being being maintained, but almost no one uses it.

      --
      Ewige Blumenkraft.
    13. Re:Why are there two?? by Anonymous Coward · · Score: 0

      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.

      Similarly, on kernel.org you can see that there's Linux 2.0.40, 2.2.26, 2.4.28, and 2.6.9. The implicit statement from Linus, of course, is that Linux users should not yet upgrade from 2.0.40.

      Nowhere on kernel.org is there a release announcement stating which version you should use over the others.

    14. Re:Why are there two?? by babybird · · Score: 1

      Maybe the question hasn't been frequently asked yet? ;)

      --
      Keith D.
    15. Re:Why are there two?? by jdavidb · · Score: 1

      That's a good idea. They should say that. If they are already saying that, they should say it more prominently.

    16. Re:Why are there two?? by jdavidb · · Score: 1

      That makes sense to me. I think a lot of people missed the boat on what I was trying to say. All of these are potentially valid reasons for people. My problem is that they should be stated up front on the first page of the Apache website that mentions the two latest and stable versions. When I'm staring at that page that offers me a choice between 2.0 and 1.x, it should state why I might want to use one or the other.

      A long time ago when I first heard about the 2.0 series, I'm pretty sure I read that it was still in development and we shouldn't rely on it for production work but use 1.x instead. That's a bit unusual for many open software projects in that usually you don't release an x.0 version until it is "ready." (They'd call it 1.99 or 2.0-PR or something.) So every time I download Apache I look for an announcement that the 2.0 branch is now preferred, and I've never seen it. All I see is the front page which still offers a choice of versions, and I think, "When is 2.0 going to be ready?"

    17. Re:Why are there two?? by paranoidgeek · · Score: 1

      This here is one of the major "great" things of the open source community unlike windows *cough* 98 *cough* or SP1 *cough*.

      --
      Lima India November Uniform X-ray
  16. Apache1 vs. Apache2 by Meostro · · Score: 1

    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?

    1. Re:Apache1 vs. Apache2 by LoadWB · · Score: 1

      One thing that I find attractive about Apache 2 is the ability to run VirtualHosts as a specific user:group.

      I like this idea as all files uploaded to the server are owned by the user and group of the Apache daemon, which doesn't do much to help me control user quotas.

      This is such an important issue that if I cannot find a module for Apache 1.3 or another easy way (aside from a cron'ed chown -R) to accomplish this, I will begin experimenting with A2/PHP5.

    2. Re:Apache1 vs. Apache2 by Meostro · · Score: 1
      This page might help, but it looks like the openisis link is broken, so this one will get you the info on FastCGI.

      Will USER directives do what you want automatically? I'm not sure what Apache classifies as CGI, PHP may or may not be included.
      User directive
      Special note: Use of this directive in <VirtualHost> requires a properly configured suEXEC wrapper. When used inside a in this manner, only the user that CGIs are run as is affected . Non-CGI requests are still processed with the user specified in the main User directive.
    3. Re:Apache1 vs. Apache2 by LoadWB · · Score: 1

      I'll look into this a little bit more in the coming days, but it appears that the user directive only affects CGI programs run via suEXEC. I am using PHP as an Apache module, so this doesn't appear to help me. I will look at the other links you have sent, thank you.

  17. Note to Slashdot moderators by gtrubetskoy · · Score: 0, Offtopic


    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.

    1. Re:Note to Slashdot moderators by Anonymous Coward · · Score: 0

      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

    2. Re:Note to Slashdot moderators by Smitty825 · · Score: 1, Insightful

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

      --

      Doh!
    3. Re:Note to Slashdot moderators by dsaljurator · · Score: 1

      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.

    4. Re:Note to Slashdot moderators by Anonymous Coward · · Score: 0

      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.

    5. Re:Note to Slashdot moderators by snipersock · · Score: 1

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

  18. Started using PHP 5.x + Apache 2.x by stilwebm · · Score: 1

    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.

    1. Re:Started using PHP 5.x + Apache 2.x by duncangough · · Score: 1

      See, this is where they ought to concentrate - PHP4 is bound to Apache 1.x but with PHP5 on the horizon and PHP being so tied to shared host, they ought to get PHP5 and Apache2 working together.

      If the shared hosts offer Apache2 + PHP5 as the default, it'll get used, Remember, PHP programmers generally don't handle the sys-admin duties, so make the decision for them and your problem is solved. Since RedHat already ship Apache2, get them to add PHP5 as the default and you're there. Easy :)

      Playaholics: Way of the exploding stick

  19. PHP and Threaded Apache by Daeron · · Score: 3, Informative

    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 ...

    1. Re:PHP and Threaded Apache by Raunch · · Score: 1

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

      To quote TFA that I R
      "So, to quote the PHP docs: threading is, potentially, a problem with PHP, this is not, technically, PHP's fault, and so PHP cant fix it. All very correct, really."

      So It's not PHP's problem and thusly they cannot solve it. So feel free to jump with abandon.

      --
      George II -- Spreading Freedom and American values, one bomb at a time.
    2. Re:PHP and Threaded Apache by Anonymous Coward · · Score: 0

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

      Actually, why anyone would want to compromise an enterprise-quality piece of software (Apache) with something as buggy and undesigned as PHP I'll never be able to even guess... Quite frankly (and yes, I do want to start a flame war), I wouldn't recommend using PHP on Apache 1.3 either -- use a modern language that doesn't encourage bad programming habits and make stupid hacks think they can program quality software...

    3. Re:PHP and Threaded Apache by Anonymous Coward · · Score: 0

      i never experimented with a threaded apache-1.3 (not even sure if that's possible)

      It's not possible, and if it were, the problems with PHP and threaded Apache 2 would also be problems with PHP and threaded Apache 1. The problem is that PHP or PHP's underlying libraries are not threadsafe.

  20. IIS by Anonymous Coward · · Score: 0

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

  21. Well worth the upgrade by cybermint · · Score: 3, Informative

    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.

  22. Re:Oblig. by Anonymous Coward · · Score: 0
    You missed the beowulf cluster of Korean old people...

    Learn you damn /. jokes, nube.

  23. Nobody told me! by Anne+Thwacks · · Score: 2, Interesting
    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?

    --
    Sent from my ASR33 using ASCII
    1. Re:Nobody told me! by Anonymous Coward · · Score: 3, Informative

      PHP depends on a large number of external libraries that may or may not be thread-safe, and in many cases they are claimed to be thread-safe but aren't. Throw in the fact that some of these libraries are system libraries and the problems may not be reproducible on other systems, and you realise that making "PHP" thread-safe (in reality, making all the libraries it depends upon thread-safe), or even just tracking down where the problem lies, is a massive problem. The PHP devs have essentially said "not our problem, and we can't fix it".

      None of this, of course, is a reason to avoid Apache 2. Apache 2 can run in prefork mode, just the same as Apache 1. That's why the PHP documentation telling everyone to avoid Apache 2 is FUD.

      Unfortunately, the threaded models Apache 2 could otherwise use are one of the major attractions of upgrading. In particular, running different websites under different uids is only possible with the threaded MPMs, which is a *huge* deal for hosting providers, PHP's main installed base. Well, it's possible by running multiple copies of Apache and a proxy on port 80, but nobody wants to do that.

    2. Re:Nobody told me! by monsterzero2002 · · Score: 0

      Is that why I got a phone bill last month for $77,545.89?

  24. Homegrown apps are one thing... by khasim · · Score: 1

    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.

    1. Re:Homegrown apps are one thing... by Bruce+Perens · · Score: 3, Interesting
      I suspect, and here I'm out on a limb, that it's a fundamental architecture issue. PHP simply did not have global thread-safety as a design goal. And thus it could be difficult to remedy at this late date, especially if it's to be done without breaking things.

      Bruce

    2. Re:Homegrown apps are one thing... by Evil+Grinn · · Score: 2, Interesting

      suspect, and here I'm out on a limb, that it's a fundamental architecture issue. PHP simply did not have global thread-safety as a design goal. And thus it could be difficult to remedy at this late date, especially if it's to be done without breaking things.

      Which, as I have remarked earlier, is a sympton of PHP never having been designed to run on Windows.

      Maybe there's an opportunity for someone to get famous by writing PHP interpreters in both Java and C#, and then they can sell it to all the PHB's out there who can't decide whether to go with J2EE or .NET. That should take care of the threading issues, although it would almost certainly break existing extensions written in C/C++. I am only half kidding.

    3. Re:Homegrown apps are one thing... by Knightking · · Score: 1

      The real problem is that none of the current php-devs are interested in resolving the issues, as they are happy with apache 1.3. Until someone who cares about the problem actually contributes the code, it'll stay how it is.

    4. Re:Homegrown apps are one thing... by DrSkwid · · Score: 1


      PHP was never designed, period.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  25. Why Switch? by Anonymous Coward · · Score: 0
    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.

  26. PHP and Apache 2.0 seem fine by Dr.Dubious+DDQ · · Score: 2, Insightful

    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...

  27. Religious War... by Lodragandraoidh · · Score: 1

    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...

    --

    Lodragan Draoidh
    The more you explain it, the more I don't understand it. - Mark Twain
  28. SemWebCentral runs Apache2 + PHP... by tcopeland · · Score: 1

    ...right here.

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

  29. Frontpage by ManuelKelly · · Score: 1

    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.

    1. Re:Frontpage by adeydas · · Score: 1

      does that many people really use frontpage...

    2. Re:Frontpage by RM6f9 · · Score: 1

      Most people who attempt beginning web-based businesses don't want to learn html/xml/php/whatever, nor pay huge sums to those who know them: We want wysiwyg easy page/site editing that will function.

      When Linux can completely (including all ease-of-use features, device drivers for my old stuff, etc...,) replace Win-doze, I'll switch. Until then, if a given web-host service doesn't support what I use, I'll find one who will.

      There are many in similar situations.

      --
      Take the 90-Day Challenge! http://rwmurker.bodybyvi.com/
    3. Re:Frontpage by slacker775 · · Score: 2, Funny

      If Frontpage extensions are not available for Apache 2, that sounds like an extremely compelling reason to use 2.0! Frontpage extensions should never be used in any way, shape or form IMHO. I suppose they can actually be secured in some fashion, but I've never encountered any organization that succeeded at it. These are always backdoors into web defacements and depending on the architecture, the organization itself.

    4. Re:Frontpage by Jokkey · · Score: 2, Informative

      In my experience, FrontPage actually works quite a bit better with Apache 2.0. FrontPage for Apache 1.x requires patching your Apache or downloading pre-patched binaries from rtr.com or Microsoft. FrontPage for Apache 2 can load cleanly as a module, no server modifications needed.

      If you want the offical notice of Apache 2 support, see here.

    5. Re:Frontpage by Anonymous Coward · · Score: 0

      please go to someone else then and bring them to their death. FrontRage extensions are extremely insecure, unstable and an administration nightmere (and this is on windows).

    6. Re:Frontpage by Zapdos · · Score: 1

      WEB Based business tell them to try mambo or try oscommerce or if neither of those seem to work have a look at this site. I do not spend any time or money at a site that looks as if it is thrown together by Uncle Joe Bob.



    7. Re:Frontpage by mabinogi · · Score: 1

      actually, This site is better, as it lists more than PHP based CMSs

      --
      Advanced users are users too!
    8. Re:Frontpage by Run4yourlives · · Score: 1
      Most people who attempt beginning web-based businesses don't want to learn html/xml/php/whatever, nor pay huge sums to those who know them: We want wysiwyg easy page/site editing that will function.

      So you're saying that a stable peice of software should be edited to enable those that don't know what they're doing to do it better?

      My friend, don't blame software for bad business choices.

  30. If they don't use it by Anonymous Coward · · Score: 1, Insightful

    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.

  31. Using PHP on Apache 2.0 right now. by suso · · Score: 4, Interesting

    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.

    1. Re:Using PHP on Apache 2.0 right now. by cliveholloway · · Score: 2, Insightful

      I spoke to the Zend guys about this at OSCON six months ago. They said they had a suexec version of PHP in "private Beta". I sent them several emails afterwards asking whether we could test it / help out etc, and haven't received a single reply, so I have no idea whether that's still coming.

      Anyone have any more info on this?

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    2. Re:Using PHP on Apache 2.0 right now. by suso · · Score: 1

      Well that's cool, that's the most I've heard of it recently.

      I first heard about the possibility of this back at ApacheCon 2000 when 2.0 was released when Mark Bloom was talking about Apache 2.0's ability to make any module run as a user other than Apache. But nothing seemed to ever come of it.

    3. Re:Using PHP on Apache 2.0 right now. by g0at · · Score: 3, Insightful

      You have raised some crucial points. I have been running PHP on my production servers for several years now, but I have always wanted answers to these questions. As time goes on I am amazed at the total silence, and actually the fact that more people are not asking the same questions. Or else, maybe I am an idiot and I am not understanding some fundamentals.

      1. why is magic_quotes_gpc on by default? Every time I install PHP somewhere I need to go into the global php.ini and turn this off. Even worse, when I am deploying code on someone else's machine where php_admin_flag is ignored in htaccess, I have to do a bunch of nested stripslashes crap to undo this. It is a fucking nuisance to have my form input contaminated in a way that PHP decides I might like. Can't we put the onus on developers to actually write secure database code, and stop creating headaches for those of us who can?

      2. why oh why can we not invoke PHP via mod_php as specific users? This is a no-brainer for a shared (read: any) system. Otherwise we are forced to use the CGI version in order to have any semblance of security, which completely negates the wholesome goodness of mod_php. Admittedly, my system is small enough that so far I have still been running mod_php with the kind of "weird things to ensure security" that you note. It is half-assed though!

      (Bonus question not related to PHP: why can we use server-wide CustomLogs which pipe to a command in order to split up logs by host, but not do the same for ErrorLogs? I am wasting a file descriptor for every virtual host just for its own ErrorLog, while I am absolved of this for the access logs. What am I missing here?)

      -ben

    4. Re:Using PHP on Apache 2.0 right now. by Scott · · Score: 1

      I believe what you are asking for would be made possibly by the per_child MPM in Apache2. It has been many months and one job since it was something I really cared about, but I know that it is still currently in a broken state, even in the new 2.1 branch.

      Others will undoubtedly disagree with me but it sure feels like the Apache foundation has forgotten about the httpd and puts most of it's muscle behind the Java projects these days, and everyone else just sort of accepts Apache in all it's cruddy glory.

    5. Re:Using PHP on Apache 2.0 right now. by Anonymous Coward · · Score: 0

      you are 100% correct. there is no way to ensure script security on a shared system other than using suexec with cgi php and per-child mpm is deader than dead. actually i figured out a way using mod_proxy and different ports for each user - but thats dumb. the mention of the private beta zend suexec php has me somewhat encouraged.

    6. Re:Using PHP on Apache 2.0 right now. by suso · · Score: 1

      You know after reading your post, I'm wondering if this has anything to Zend's business model. At the current place I'm working, we were called by Zend once and were asked a bunch of questions about how we use PHP and Apache in our environment and a lot of questions directed towards one-server non-shared shops. Perhaps (and this is guessing) they think that since most of their income and interest comes from such environments that they should cater to them.

      But I really feel your sense of wonder as to why others in the community aren't asking such questions. Sometimes I think I should hang out more often on forums like "Web Hosting Talk" to get more information on what others are doing. But everytime I go there, I feel like I'm in a spammers forum. Eyhe!

    7. Re:Using PHP on Apache 2.0 right now. by g0at · · Score: 1

      Yeah. I would raise more hell about this and actually try to get involved in pursuing a solution, except that I don't have much expertise with UNIX system-level development, coupled with the fact that as a one-man shop I'm already too busy doing too much (even to read things like webhostingtalk). :/

      Nonetheless I would be interested in maybe getting a few of us in this thread together in a conversation (by e-mail or whatever) to share our best practices and see what we can come up with insofar as solutions.

      -ben

    8. Re:Using PHP on Apache 2.0 right now. by Tony+Hoyle · · Score: 1

      That's easy... if a program won't run in safe mode or requires register_globals then tough. It doesn't go anywhere near my servers.

    9. Re:Using PHP on Apache 2.0 right now. by sean_gabriel · · Score: 2, Informative

      Well perchild was supposed to provide this functionality, but it's unmaintained and nonfunctional from what I understand. Even if it does work it has security problems. On top of that it's a threaded MPM, so it carries the same thread-safety issues that worker does for PHP.

      There are some of us who are attempting to provide a working alternative. The MetuxMPM project can be considered a working implimentation of perchild, although still in development. It still uses the threaded model but doesn't suffer the same security issue.

      I required a non-threaded solution, so I started my own MPM project, using prefork as a base but copying in a lot of code from metuxmpm. I call it "peruser". Right now it's a lot more clunky than metuxmpm. I'm also not a professional C or apache programmer, so if anyone out there wants to help I'd really appreciate it.

      Neither of these projects is really well-suited for a small number of websites that do a lot of traffic. They're more aimed at shared hosting providers who want to provide better security than php's safe_mode.

      Here's the links:
      MetuxMPM
      Peruser (nonthreaded version of metuxmpm)

    10. Re:Using PHP on Apache 2.0 right now. by Anonymous Coward · · Score: 0

      Sure, you'll be able to get it from Zend for only $399 per year!

    11. Re:Using PHP on Apache 2.0 right now. by MikeFM · · Score: 1

      I've been running PHP with Apache 2 for a long time too and I haven't experienced any problems.

      I agree that PHP could use some rethinking in certain area but overall it works great. For more complex problems it's better to switch to mod_python anyway as PHP grows increasingly more painful to maintain the larger the program gets. PHP5 does improve on this issue though.

      It's possible to run PHP with different permissions for different server users but it is something of a pain to configure.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    12. Re:Using PHP on Apache 2.0 right now. by drew · · Score: 2, Interesting

      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.

      i agree completely- i have had no end of problems with one of my co workers who continually writes code that requires register_globals and magic_quotes_gpc, no matter how many times i ask him not too. and even though i have told him that those options will be turned off for any new system that i set up, he still asks me why his code is breaking every time i set up a new site...

      what's really annoying is that this guy is the most paranoid guy i've ever met when it comes to securing servers against remote shell exploits. apparently he couldn't care less whether he is writing exploitable web sites, though...

      --
      If I don't put anything here, will anyone recognize me anymore?
    13. Re:Using PHP on Apache 2.0 right now. by Anonymous Coward · · Score: 0

      Good questions, I can answer #2 as its fairly straightforward.

      People who need magic_quotes_gpc turned on are not likely to be the kind of people who know how to turn it on, and often would not be the kind of people who would find out about such features. Having it turned on by default reduces PHP security problems and the related bad publicity .

      People like you and me, who understand the issues and have the related stripslashes() headaches are able to turn it off easily.

      As an example of why this is needed, just read any PHP story on slashdot, 90% of the negative comments are irrelevant if safe_mode is turned on or register_globals turned off and thats been there for years, yet people still use it to take digs at PHP.

      Oh, and php_admin_flag is blocked in .htaccess to stop users turning safe_mode off and exec()'ing stuff they shouldn't (e.g. shell.php). Yes theres other ways but layered security etc etc.

    14. Re:Using PHP on Apache 2.0 right now. by Rich0 · · Score: 2, Interesting

      There simply shouldn't be a php.ini. Or if there is one it should be along the lines of the config files other languages use to set up DNS resolution, library load paths, etc.

      Imagine if every system had a gcc.ini, a glibc.ini, and so on?

      Imagine if allow_pointers, disable_switch_statement, and short_circuit_boolean were system-wide global settings?

      Good luck getting enough compatible software on a system to even boot it!

      A language should have defined default behavior. If you want to modify the default behavior, this should be done via a directive in the source code of some sort. Then each program can have its own settings. If you have a webserver with 100 programs on it, and one requires register_globals, why enable this for every piece of source on the server?

  32. disillusioned (slightly) by asliarun · · Score: 1

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

    sigh

    1. Re:disillusioned (slightly) by MassacrE · · Score: 1

      There is no direct money in open source, all they have is politics and ideals...

  33. 2.0 issues by Anonymous Coward · · Score: 0

    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.....

  34. Slashdot uses Boa for images by Tim+Macinta · · Score: 4, Informative
    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 - 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.

  35. Even so by einhverfr · · Score: 1

    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.

    --

    LedgerSMB: Open source Accounting/ERP
  36. Making the sqitch by haplo21112 · · Score: 2, Informative

    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...

    --
    Power Corrupts,Absolute Power Corrupts Absolutely, leaving one person(group)in charge is absolutely corrupt.
  37. No its not worth it, by Jason+Hood · · Score: 5, Funny


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

    --
    Are you intolerant of intolerant people?
  38. Don't Listen to Rich by Anonymous Coward · · Score: 0

    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.

  39. What extensions? by bucky0 · · Score: 3, Interesting

    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?

    --

    -Bucky
  40. Re:Oblig. by temojen · · Score: 1

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

  41. Zounds!!! We've finally achieved par with Windows by Anonymous Coward · · Score: 1, Insightful

    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 :-)

  42. Apache2: The only choice for Win32 by Spy+der+Mann · · Score: 1

    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"

    1. Re:Apache2: The only choice for Win32 by dsb3 · · Score: 1

      Look at the suphp (http://www.suphp.org/) module. It solves your problem.

      --

      Slashdot? Oh, I just read it for the articles.
    2. Re:Apache2: The only choice for Win32 by JimDabell · · Score: 3, Interesting

      I'd gladly ask the Apache and PHP guys to fix their "nobody" user problem, and start PHP with separate accounts.

      Apache 2 threaded MPMs can run different vhosts under different users, so this has been fixed for over two years. If PHP was thread-safe, you wouldn't have a problem, but as this story highlights, PHP doesn't play nice with threads.

    3. Re:Apache2: The only choice for Win32 by sydneyfong · · Score: 1

      last I checked, the perchild-MPM is still highly experimental.

      http://httpd.apache.org/docs-2.0/mod/perchild.ht ml

      This module is not functional. Development of this module is not complete and is not currently active. Do not use perchild unless you are a programmer willing to help fix it.

      --
      Don't quote me on this.
  43. Re:I'm sorry Bruce, you'll have to come back later by Bruce+Perens · · Score: 5, Funny
    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

  44. From the PHP Manual by Anonymous Coward · · Score: 0
    http://www.php.net/manual/en/faq.installation.php# faq.installation.apache2

    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.
  45. apachetoolbox supports the 1.x apache by phildog · · Score: 2, Interesting
    For me the reason to use apache 1.x with PHP is very simple. That is the only configuration that is supported by ApacheToolbox.

    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?

    --
    slashsearch.org - slashdot search. powered by google.
    1. Re:apachetoolbox supports the 1.x apache by SQLz · · Score: 1

      Or, try gentoo. "emerge mod_php"

    2. Re:apachetoolbox supports the 1.x apache by eddy · · Score: 1

      Because it's not really their job to package up different software. That's the purpose of a good distribution.

      $ apt-cache search ^libapache2
      libapache2-mod-auth-mysql - Apache 2 module for MySQL authentication
      libapache2-mod-auth-pam - Module for Apache2 which authenticate using PAM
      libapache2-mod-auth-pgsql - Module for Apache2 which provides pgsql authentication
      libapache2-mod-auth-plain - Module for Apache2 which provides plaintext authentication
      libapache2-mod-auth-sys-group - Module for Apache2 which checks user against system group
      libapache2-mod-chroot - run Apache in a secure chroot environment
      libapache2-mod-encoding - Apache2 module for non-ascii filename interoperability
      libapache2-mod-jk2 - Apache 2.0 connector for the Tomcat Java servlet engine
      libapache2-mod-layout - Apache2 web page content wrapper
      libapache2-mod-ldap-userdir - Apache2 module that provides UserDir lookups via LDAP
      libapache2-mod-macro - Create macros inside apache2 config files
      libapache2-mod-musicindex - Browse, stream, download and search through MP3/Ogg files
      libapache2-mod-perl2 - Integration of perl with the Apache2 web server
      libapache2-mod-php4 - server-side, HTML-embedded scripting language (apache 2.0 module)
      libapache2-mod-proxy-html - Apache2 filter module for HTML links rewriting
      libapache2-mod-python - An Apache module that embeds Python within the server
      libapache2-mod-python-doc - An Apache module that embeds Python within the server
      libapache2-mod-python2.2 - An Apache 2 module that embeds Python 2.2 within the server
      libapache2-mod-python2.3 - An Apache 2 module that embeds Python 2.3 within the server
      libapache2-mod-ruby - Embedding Ruby in the Apache2 web server
      libapache2-mod-scgi - Apache module implementing the SCGI protocol.
      libapache2-mod-security - Tighten the Web application security for Apache 2.x
      libapache2-mod-suphp - Apache2 module to run php scripts with the owner permissions
      libapache2-mod-xmlrpc2 - XMLRPC Server module for Apache2 web server
      libapache2-modxslt - XSLT processing module for Apache 2.0.x based on libxml2
      libapache2-redirtoservname - Apache 2 module to redirect users to the canonical hostname
      libapache2-request-perl - Generic Apache Request Library
      libapache2-svn - Apache modules for Subversion (aka. svn)
      libapache2-mod-fastcgi - FastCGI module for Apache2

      So with Debian, like any good dist, you'd just "apt-get install" whatever packages you need.

      --
      Belief is the currency of delusion.
  46. Apache 2.x memory model is bizarre by Anonymous Coward · · Score: 1, Informative

    The memory pools in Apache 2.x (apr_pool_t) are quite inefficient. 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.

    1. Re:Apache 2.x memory model is bizarre by Bruce+Perens · · Score: 4, Informative
      Consider that this could be a speed vs. space tradeoff. They are inefficient in terms of memory use. However, it's nice to have memory that is private to a thread such that only that thread accesses the entire memory page. That means that the caches and the TLBs don't invalidate as often because some other CPU has touched the data. Remember that in a multi-processor system the cache and TLBs have to watch what is happening on the bus, and invalidate themselves when they see someone else do a write to some data that they hold. Given that we have really fast processors and slow memory, this can get expensive.

      Bruce

    2. Re:Apache 2.x memory model is bizarre by Anonymous Coward · · Score: 0

      There needn't be a space-time tradeoff - you can win on both counts. Please read the link in the parent post by the author of Hoard about the defects in the Apache Portable Runtime's handling of memory. He knows more about TLBs and caches than we will ever know.

    3. Re:Apache 2.x memory model is bizarre by markv242 · · Score: 1
      In the forking model, this is true.

      In the worker mpm, this is true only in cases when you are handling a very small amount of traffic -- in all other cases, the memory used by the worker mpm mode is far, far less.

      Example: here is a box currently handling 146 simultaneous requests, running at 34 requests per second.

      28229 nobody 179 58 0 59M 48M run 5:18 7.56% httpd
      20844 nobody 6 58 0 48M 34M sleep 7:49 0.00% httpd
      27387 nobody 5 58 0 55M 41M sleep 7:47 0.00% httpd
      25971 nobody 3 50 0 20M 1864K sleep 0:00 0.00% httpd
      That's around 175 megs of memory being used. Apache 1.3, using the prefork model, would have to take up only 1.5 megs of memory for each process to be as memory-efficient as Apache 2.0.
    4. Re:Apache 2.x memory model is bizarre by Erik+Hollensbe · · Score: 1

      You know what shared memory is, right? I think the "shared" word might give you some clues.

      Also as you note, you're saturating your server far beyond it's limits having over 4 times the amount of requests it can serve (I imagine that's actually serves and not theoretical B.S. - it takes longer to service a modem connection and will bog down your server doing so).. You might have considerable luck increasing the MinSpareServers directive in a forked model. The forking is killing you, not the memory usage, although it sure looks like that. The faster you're able to respond to those requests (thus getting rid of them), the less memory you need. Personally I think you should be forking at least 5 above your "average to heavy" RPS.

      At a company I used to work for, heavy oracle traffic would cause this phenom and we called it "the oracle death spiral". It was bad application usage and much harder to fix.

  47. Clarification by sp3c1alK · · Score: 1

    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.

  48. How many hits? by dsb3 · · Score: 4, Informative

    I sustain 5 million hits per day on an Apache2+PHP server that (for me) indicates it's a "do-able" platform to run with.

    --

    Slashdot? Oh, I just read it for the articles.
    1. Re:How many hits? by Anonymous Coward · · Score: 0

      Mind posting the link so we can give it the old heave-ho?

    2. Re:How many hits? by Anonymous Coward · · Score: 0

      Heh, it'd be nice if you told us what was getting these hits. What are you hosting? A PHP counter? Whoop-dee-doo.

  49. I think they're right by jeif1k · · Score: 3, Interesting

    PHP prides itself on being an easy-to-use language for web applications, and it succeeds. Unfortunately, Apache hasn't become any easier to install and configure between 1.x and 2.x; in fact, if anything, I think it has gotten overall worse. That's why Apache 1.x is a better match to PHP than Apache 2.x. If Apache wants 2.x to be a better match with PHP, then Apache needs to address the problems the PHP community sees with 2.x.

    Personally, I'd like to see more server alternatives to Apache anyway. I think there should be a handful of FOSS web servers capable of hosting PHP, web servers that make different kinds of tradeoffs between performance, security, and ease-of-use. The huge market share that Apache has, from my point of view, is a problem, just like the huge market share that Microsoft has in other areas.

    1. Re:I think they're right by ivan37 · · Score: 2, Informative

      lighttpd is a pretty good up-and-coming alternative I've been testing lately. It's faster than apache for both static and dynamic (php, python, ruby) content.

    2. Re:I think they're right by Bugaboo · · Score: 1

      Apache2's Windows distrobution is the easiest webserver I've ever configured. Installing it is a total breeze; it uses a standard MSI package and is very polished. Configuring it is just like configuring any other Apache installation; you have to edit the .conf file but it's full of documentation and I was able to teach myself quite a bit just by reading the comments in that file and Googling where necessary.

    3. Re:I think they're right by ArbitraryConstant · · Score: 1

      I would be very nervous about using an unproven server for security reasons.

      --
      I rarely criticize things I don't care about.
    4. Re:I think they're right by jeif1k · · Score: 1

      Apache2's Windows [...] uses a standard MSI package and is very polished.

      Well, and Linux packages are even more polished than MSI; that's not what I was referring to.

      you have to edit the .conf file but it's full of documentation and I was able to teach myself quite a bit just by reading the comments in that file and Googling where necessary.

      The problem isn't knowing what to put in the .conf files (I know that perfectly well), it's that even if you know what to put there, you still have to deal with hundreds of options, dozens of modules, and lots of weird interactions between them all. Apache configuration is far more complex than it ought to be because it provides flexibility in areas where even fairly complex sites just don't need flexibility.

  50. Bandwidth Throttle by TheFlu · · Score: 1

    Is there any way for Apache 2 to throttle bandwidth for Virtual Hosts? I know the mod_throttle and mod_bandwidth modules for Apache 1.3 were extremely popular with people hosting multiple sites. Is there any support for this feature in Apache 2?

  51. Not up to us ... by A+nonymous+Coward · · Score: 3, Funny

    How much longer can we keep this joke going?

    Talk to Microsoft, it's them what's keeping the joke going.

  52. Don't see the issue with Apache 2 and PHP by web_boyo_in_sac · · Score: 2, Interesting

    I've been using Apache 2 and PHP for almost a year on a pretty high traffic system and it works fine. But I don't do any image work or odd compression or scientific formulas so I don't compile some libs in. I think the Zend guys need to actually break down which libs shouldn't be run with Apache2

  53. Apache 1.3.x v.s. Apache 2 by thenextpresident · · Score: 1

    Interestingly enough, the site for the Apache spokesman, on Apache 2.0, is down; while the site PHP guru John Coggeshall, on Apache 1.3, is still up.

    --
    Jason Lotito
  54. Main reason: Lazyness? by ashpool7 · · Score: 1

    Coggeshall seems to put it best by outlining all the new features that Apache 2 offers and then describing how they are mostly useless to people, but in most instances, to himself. Thanks. We all appreciate you determining for everyone else what features we do/do not need.

    In my estimation, the PHP guys really don't care, because making PHP build safely for Apache 2 wouldn't give enough of a payoff to make it worth their while, thereby crippling any improvement over the current Apache 1.

    I would think that they could at least make the build system for PHP by:

    1. Mark all the thread-unsafe libraries and extensions
    2. Issue a warning/stop the build if those are compiled against Apache 2

    I don't think that would be terribly difficult. So, yeah, I'm going to go with "lazyness" as the answer.

  55. Apache Tweak. by DarkHelmet · · Score: 5, Interesting
    I've been running Apache 2.0 for the past year or so, without any problems whatsoever.

    The problem is running apache in WORKER or PERCHILD MPM modes. Those are the ones that are using threading.

    What I'd recommend to anyone who wants to have a robust, fast apache implementation is to do the following:

    • Setup a version of Apache on port 80 that runs worker MPM. Use this version for serving images and html files.
    • Setup a separate version of apache (port 9000 or whatever) on prefork that runs all CGI / PHP based stuff.
    • Proxy requests matching PHP / CGI / etc to the port 9000 version of apache.

    There you go... performance increase for 75% of serving requests.

    P.S: Avoid perchild at all costs!

    --
    /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    1. Re:Apache Tweak. by Anonymous Coward · · Score: 0

      Why do you need something as heavyweight as Apache for serving static files? All our pages are dynamic so we just link all our static content to mathopd or publicfile listening on another port.

    2. Re:Apache Tweak. by DarkHelmet · · Score: 1
      Directly?

      Good luck with business clients whose workplaces don't open arbitrary ports.

      --
      /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    3. Re:Apache Tweak. by Anonymous Coward · · Score: 0

      What do you mean? the port dosent need to be open to the public. the apache on port 80 just proxies requests to port 9000/whatever.

  56. Was Puff right? by sleighb0y · · Score: 1

    Entire Lyrics
    MP3
    OGG



    "So once agin' it was right, but then
    The lake went dry, she was gone again!
    Fish started flippin' and floppin' about
    Yellin' "Mercy Puff! It's a doggone drought!"

    So he rolled up-gulch till he hit the lake
    Of Apache fish, they was on the take
    They'd built a dam that was made of rules
    Now Puff was pissed and he lost his cool!


    I'm sick and tired of these goldarn words!
    n' laws n' bureaucratic nerds!
    You're full o' beans n' killin' my town
    and if you's all don't shut er down

    I'll hang a lickin' on every one
    of you sons o' bitchin' greedy scum!
    So he blew the dam, an' he let 'er haul
    Cause water oughta be free for all!"

  57. good riddance by RelliK · · Score: 1

    Maybe this will give people the reason to obsolete PHP and use a real language for server-side scripting.

    --
    ___
    If you think big enough, you'll never have to do it.
    1. Re:good riddance by Run4yourlives · · Score: 1
      use a real language for server-side scripting.

      Such as?

    2. Re:good riddance by quelrods · · Score: 1

      Something compiled is a good start, try J2EE for server side applications. Hell I'd even prefer mod_perl over php.

      --
      :(){ :|:&};:
  58. Um ... that's not quite what I said by rbowen · · Score: 2, Informative

    Allow me to clarify something if I may. I'm not suggesting that everyone needs to migrate to Apache 2.0 today. I'm suggesting that PHP not strenuously discourage people from doing so. Those are two rather different things.

    I hardly think that my posting (which, of course, nobody can read now because my server in my bedroom is melting. *sigh*) qualifies as unimitigated flames.

    And I *certainly* don't presume to speak for the whole Apache community. It was just some (I thought0 harmless observations.

    --
    Apache guy, Open Source enthusiast, runner
  59. Nothing to do with PHP, its very simple. by Anonymous Coward · · Score: 0

    Apache 2 has a non-free license, has had so many security problems in its short life its not even funny, and there are inevitably tons more waiting to be found since the new codebase is so much more complex. All this complexity makes apache work much better on windows, and gets you nothing at all if you use unix.

    So, its a question of using the tried and true apache 1, with a better license and fewer security problems, or switching to apache 2 with a worse license, more security problems, and no benefits. Gee, tough call.

    1. Re:Nothing to do with PHP, its very simple. by Quill_28 · · Score: 1

      >Apache 2 has a non-free license

      I must not understand the lingo, how is it not free?

    2. Re:Nothing to do with PHP, its very simple. by Anonymous Coward · · Score: 0

      Well, did you have your lawyer go over it with you? Too bad its such a huge mess of legalese that you need to isn't it?

      The problem is clause 3, if apache were to infringe on my patents, and I sued them, my license is revoked. Free does not mena free until you sue us.

    3. Re:Nothing to do with PHP, its very simple. by Anonymous Coward · · Score: 0

      Theo is that you?

  60. FUD is logical. by Spy+der+Mann · · Score: 3, Insightful

    PHP spread FUD about Apache2 because that's what they *THINK* of it.

    [F]ear - what if my PHP processes crash?
    [U]ncertainty - has this thing been tested yet?
    [D]oubt - Hmmm I'm not sure...

    And as far as I know, no one has dared to make a COMPLETE TEST of PHP running with Apache2, explaining which PHP modules fail and why.

    In other words, it's simply FEAR OF THE UNKNOWN what the php community has about Apache2.

    1. Re:FUD is logical. by Qzukk · · Score: 2, Interesting

      no one has dared to make a COMPLETE TEST of PHP running with Apache2, explaining which PHP modules fail and why.

      This is what I want to know. Which modules use libraries that are threadsafe (or have threadsafe versions)? Which modules are known to crash the thread?

      I build php here with postgresql as the only additional library over whatever the default modules are (and I have found threadsafe patches for libpq). Is having threadsafe libraries enough?

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
  61. Have it Both Ways by Chris+L.+Mason · · Score: 1

    I really don't understand why there needs to be any argument or disagreement here. If some people really like Apache 1.x a lot and don't like 2.x (whether it is justified or not), there's a easy solution: Fork 1.x and maintain it yourself. Then the Apache people can focus on 2.x and not worry about 1.x and the PHP people can choose either competing package based on which they like best.

    This is similar to the whole FreeBSD 4.x vs 5.x arguments and the spawning of Dragonfly. Open Source is about choice, and different projects can live or die based on their usefulness and/or popularity.

  62. What problems are there? by shish · · Score: 1

    I know there are problems in theory, but has anyone had any in practice? I've been using PHP with apache2 for quite a while, and not noticed anything weird - it would seem to be the same case for everyone else I've talked to...

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
  63. ALWAYS ask this question by DogDude · · Score: 1

    This isn't controversial at all. If you're doing anything remotely important with software, the question WHY should ALWAYS be asked when upgrading. Too many kids these days upgrade for the sake of upgrading, without thinking. If there's nothing wrong with your current software, and little or nothing to be explicity gained from upgrading, then upgrading is a waste of time, money, and simply a bad idea.

    --
    I don't respond to AC's.
  64. contrapositive by Doc+Ruby · · Score: 1

    Recommending people not use Apache 2.0 with PHP is totally different from not recommending people use 2.0, because Apache 1.x is acceptable and considered secure. Recommending not to use an upgrade requires evidence or other proof of claims of insecurity, or it *is* just FUD, while not recommending an upgrade when the old version still works (and is still maintained, including security patches) is a prudent IT management policy.

    On the same note, condemning a software organization for engaging in FUD is totally different from condemning its software package as bad. We're dealing with globat IT, on which billions of dollars, and even many people's lives, depend in critical paths and essential systems. We don't make good decisions about IT choices by reducing them to "we don't like you anymore" or "you're mean". That kind of childish conflation of product criticism with personal dislike is one advantage that proprietary companies exploit in their "button-down" "businesslike" image management, competing with even the most successful open source projects like Apache. Let's get our heads together and get over it.

    --

    --
    make install -not war

  65. Much the same as... by yoshi_mon · · Score: 2, Interesting

    In large projects there are often people who have production systems that would incur large costs if they were forced to do a major rev upgrade.

    Of course before OSS this was never an issue as people didn't have a choice but as people now do, thanks largely in part to the ability of OSS project heads to put a few "free" developers on a older rev for maintenance, large OSS projects often maintain older revs for the sake of the users..

    You really need look no further than the Linux Kernel to see another example of this in action.

    --

    Really, I know what I'm doing...Ohhhh, look at the shiny buttons!
  66. Efficiency is not entirely a web server function by Bruce+Perens · · Score: 4, Informative
    For most web servers on Linux, once the server has figured out what static file to send, it calls sendfile() and the rest of the work is entirely in the kernel until the file has been transmitted. On certain network cards, sendfile() has the property of being able to DMA from the disk to the network card without intermediate buffers. At least for big files, this is probably running very close to the hardware limit. For small files, the server efficiency is more of a factor.

    Bruce

  67. The Problems are real by Bruha · · Score: 1

    I've noticed many times that Apache and Php will not play nicely with eachother when compiling them as static or dynamic objects.. it's always been hit or miss with versions and features to the point I went back to 1x apache.

  68. Stop picking on PHP by Duncan3 · · Score: 3, Insightful

    Stop being so mean! It's not PHP's fault they can't run in a thread model. Threads have only been commonplace for 25 years, and the standard way you do things for 15.

    They just need some time to catch up. Apache 2.x is light years faster/leaner/meaner then 1.x was. Oh, and PHP runs perfectly fine under 2.x, as others have pointed out.

    OK, so yea, it's actually kinda sad (read: pathetic)

    --
    - Adam L. Beberg - The Cosm Project - http://www.mithral.com/
    1. Re:Stop picking on PHP by cant_get_a_good_nick · · Score: 2, Interesting

      My belief is that PHP is fine under threads, a lot of the third party stuff is unknown (can be read: probably will break) and the PHP guys don't want to bother with broken 3rd party stuff.

      This kind of misses the point. The assumption "why bother with apache 2.0 if it doesn't run in multi-threaded mode" misses all the cool things that have gone into apache 2.0 outside of the threading models. I'ts a lot saner, and has cool things like chaining (output of CGI can go through SSI) and a million other things. The PHP guys should just say "run it in the old MPM mpde and have fun" which is I think the real sticking point.

  69. A Patch by Anonymous Coward · · Score: 0

    The origin of the name "Apache"

  70. been mulling over this for the past few weeks by capt.mellow · · Score: 1

    . . . and after reading up on things, I determined that:

    1) for my win2k server, apache 2 is a necessary upgrade
    2) for apache 2, php 4 is a safer choice
    3) if I ran a *nix box, I would be using Apache 1.3 & php 5

    1. Re:been mulling over this for the past few weeks by Anonymous Coward · · Score: 0

      why is php4 safer for apache 2?

    2. Re:been mulling over this for the past few weeks by capt.mellow · · Score: 1
      Well, the install.txt file in the php zip mentions that:
      PHP and Apache 2.0.x compatibility notes: The following versions of PHP are known to work with the most recent version of Apache 2.0.x:

      * PHP 4.3.0 or later available at http://www.php.net/downloads.php.

      Of course, it also warns right above it not to use apache2 & php in a production environment. :P
    3. Re:been mulling over this for the past few weeks by lordfener · · Score: 1

      Why blame the PHP group? PHP wasn't designed to run under Ap2. Period. If it runs, great. If it doesn't, either don't use one or the other. The question boils down to whether having Ap2 is more important than having PHP.

  71. Note to gtrubetskoy by Anonymous Coward · · Score: 0

    Moderators do not post stories, they moderate comments. Editors post stories.

  72. Windows doesn't seem to have this problem by Anonymous Coward · · Score: 2, Insightful

    The horror of actually making solid software; nobody's upgrading.
    Maybe Windows knows what it's doing after all.

  73. What problems? by maxphunk · · Score: 1

    I'm running Apache 2 and PHP 5 under FreeBSD 5.3 with no problems (that I know of...). Whats all the ruckus about?

    # cd /usr/ports/lang/php5-extensions
    # make install clean

    --

    "The chief enemy of creativity is 'good taste'" -Pablo Picasso
  74. Is PHP worth the effort at all? by Anonymous Coward · · Score: 0

    The developers of PHP have one major, ongoing problem - they don't know the meaning of the term "backward compatibility". The last three major updates to PHP have all broken major features and applications. Apache, on the other hand, just keeps working. Given mod_perl and java, why do we need to keep dealing with PHP at all?

    1. Re:Is PHP worth the effort at all? by Lord+Bitman · · Score: 1

      ever try out a basic hello world type application in PHP and have it inexplicably start showing you values from other peoples' sessions? Values like names, addresses, credit card numbers? I've never had that happen in PHP, but when I tried mod_perl (and yes, I know perl), I started seeing that happen. No, I dont know why. I know this happens to other people, too. I dont _care_ why. Anything which can let you do that without knowing why- by fucking default -should be avoided.

      And Java is crap.

      (this is _NOT_ a troll post. This is an answer to a question.)

      --
      -- 'The' Lord and Master Bitman On High, Master Of All
    2. Re:Is PHP worth the effort at all? by Anonymous Coward · · Score: 0

      Funny, I had the same experience with mod_php. If you use PHP settings in your apache.conf (like php_admin_flag), in some old version it would *retain* those settings on subsequent hits It was an nightmare to track down but finally we fixed it and the problem went away in a subsequent version.

      You might now Perl but maybe you don't know mod_perl! Once you know the tricks behind it, it works as advertised.

      Of course they are all crap compared to Ruby or Lisp or Smalltalk but I'd have to say Java and PHP are among the crappiest and poorly designed examples of computer languages you could come across. The exception handling in PHP5 is especially funny.

    3. Re:Is PHP worth the effort at all? by Lord+Bitman · · Score: 1

      I know nothing of the Java language, I know only that I have never seen Java used and thought to myself "this is not an abysmal peice of crap, and it runs smoothly enough that it is useable"

      --
      -- 'The' Lord and Master Bitman On High, Master Of All
    4. Re:Is PHP worth the effort at all? by Anonymous Coward · · Score: 0

      "Once you know the tricks behind it, it works as advertised."

      The phrase "working as advertised" means that it works as documented, i.e., it specifically means that you don't need to know a lot of special tricks.

  75. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  76. Who needs PHP anyway? by KlomDark · · Score: 0, Troll

    I know it's widely used, but it's a pretty bullshit little language anyway. Kind of the beginner language for web coding.

    Make a list sometimes. Of websites that go down completely (return some kind of an error) instead of just slowing down during a slashdotting, most of them are PHP issues. Almost every site dead from load is one spouting some "PHP process..." message.

  77. PHP and Subversion by tjohns · · Score: 1

    I think this is going to become more of an issue as software projects choose to target different versions of Apache.

    For instance, recently I was setting up a Subversion server for a project I was working on. It turns out that if you want to run Subversion over WebDAV/DeltaV, you are forced to use the Apache 2 series. As many have pointed out, if you try to use PHP in this environment httpd will randomly die off since PHP isn't thread-safe. When you are using Apache to write information, rather than read it, this is a very troubling issue.

    Of course, this is easy enough to work around, you can either use one of the other access methods that Subversion supports, or install both versions of Apache simultaneously, placing them on different ports, or simply choose not to use PHP, however these are all workarounds, not solutions. Imagine what happens if other software takes this approach, say for example jboss, and you need to use both for different parts of your site. Suddenly, the "run both servers concurrently" approach doesn't look very attractive.

    1. Re:PHP and Subversion by DarkBlack · · Score: 3, Informative

      You can run both Subversion and PHP 4 concurrently in Apache 2.0. We've been doing it sucessfully for several months now with no problems in prefork mode. No need for two versions of Apache when one will do.

    2. Re:PHP and Subversion by Anonymous Coward · · Score: 0

      use fastcgi?? use preforking MPM or whatever they call it??

      php is limited and somewhat broken, so why not set it up over fastcgi so that you can use whatever web server etc. that you want?

    3. Re:PHP and Subversion by Anonymous Coward · · Score: 0

      Why not just install subversion on Windows, I've been running this for a while now and it works very well...

  78. Memory by faxafloi · · Score: 1

    Our problem was that we have database searches that return potentially hungous numbers of records, which take up memory, which isn't given back to the system. Having lots of giant Apache processes around drove us to make the Apache process die when it was done. I forget the name of the PHP command that does this, but I recall from my testing that it didn't work with Apache 2. Does it now? or is memory usage handled differently now?

    (Yes, I know the best solution would be to page the results, but that would require significant retooling of the application - long story - and I wanted the upgrade to be a simple drop-in replacement with no code changes. And we're short on resources, so proxying such requests would not buy us much.)

    --
    Exit, pursued by a bear.
  79. What if by lazydog · · Score: 0

    How about we classify the php extensions as "thread safe" and "not thread safe". This way when I make a custom install of php, I can decide which apache to install based on the extensions I require. Does such a list already exist?

  80. Apache is ignoring the killer reason for Apache2! by mcrbids · · Score: 1

    The biggest problem with PHP-based virtual hosting is that any script running has full permissions as user "nobody".

    PHP SafeMode is an ugly hack fraught with security holes. The real answer is RIGHT HERE but alas, it's been dropped.

    these guys have done some more work with it, and the best bet (so far) seems to be this one which (at least) has active development on it.

    I LOVE the idea - from a security standpoint, this is the best news for Apache/Unix shared hosting since the invention of the password. I have a fairly busy server (about 700 active domains) and I'll be slowly migrating over the next 6 months or so to using this tool.

    It works with PHP and Apache2. I just won't use any non-threadsafe libs, so no issues there.

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  81. this article makes no sense! by Anonymous Coward · · Score: 0

    first it says not to use apache 2.0 with php, then it says that php commnunity is promoting 2.0?

    what the hell ??? screw the moderators, we need editors

  82. Re:Oblig. by Anonymous Coward · · Score: 0

    Yeah!? Well in Korea, Worker-MPM race condition is only for old people!

  83. Simple Explanation... by Anonymous Coward · · Score: 0

    Microsoft says that if its not digitally signed, its not safe to download.

  84. mark PEAR as unsafe on compile for Apache 2 by ashpool7 · · Score: 1

    then the user would have to force the install if the PEAR modules they plan to use are ok.

    Binaries... compiled safe only.

    1. Re:mark PEAR as unsafe on compile for Apache 2 by JabberWokky · · Score: 1
      That's another option.

      As I said, something will be done. It's just not done yet because there is no pressing reason to, as Apache2 offers nothing substantial over Apache 1.x. (Yes, I know there *are* differences, just not enough for the majority of PHP people to switch).

      It should be noted that I run a group of servers on the high end of a small installation (12 production plus 4 dev), and PHP is our language of choice. Half of dev runs Apache/2.0.49, while the rest run Apache 1.3.x. We have encountered no problems directly related to PHP.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  85. Didn't your grandparents ever tell you... by Anonymous Coward · · Score: 0

    ...Silver and Black appliances don't mix.

    Long live the confede.....Nevermind.

  86. Compelling reason to upgrade by SD_92104 · · Score: 1

    I guess trying to run subversion with Apache might be a compelling reason to upgrade since it requires Apache2...

    (Running Apache2 with svn, PHP, ... with no problems here)

  87. Losing sleep over Apache 2 by dibbs_online · · Score: 1

    I made the decision to continue using Apache 1.3 simply because of the higher number of security related releases on the 2.0 branch.

    Having worked for software engineering companies I can appriciate the pride and dedication to products that developers have, every developer would love you to run his latest and greatest code.

    Unfortuantly on the other side of the dice when I am administering servers I appriciate stability and longer cycles between upgrades or security advisories.

  88. No license comments? by evilviper · · Score: 0

    I'm surprised nobody has mentioned that the Apache2 license is more restrictive than the Apache1 license, which could make for problems.

    Does anyone else remember when SSHv1 was free, and SSHv2 was commercial? It took years before most machines dropped SSHv1, despite it's numerous security problems.

    License issues can be very significant.

    --
    Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  89. OT: Great sig by ConceptJunkie · · Score: 4, Funny

    The problems with Christianity and D&D are essentially the same: too many people RTFM, but don't comprehend it.

    Great sig!

    The good thing about Christianity is that the DM is much, much better. Or at least more consistent.

    The bad thing is that He can't be bought off with a six-pack of Dew and a pizza.

    The good thing about D&D is that the DM is usually your friend and will try to make it so you have fun.

    The bad thing is that the DM can give you millions of gold pieces, +8 everything and make you king of world or even a god, but you still gotta go to work/class on Monday morning.

    --
    You are in a maze of twisty little passages, all alike.
    1. Re:OT: Great sig by Randolpho · · Score: 1

      Heh... good ones.

      I can't claim to be the original author of the quote, but I've been tweaking the basic concept over the past few weeks... I think I'll change it to this:

      "The problems with Christianity and D&D are essentially the same: too many rules lawyers."

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
    2. Re:OT: Great sig by ConceptJunkie · · Score: 1

      That one's good, but I like the old one better... I think it's more common (at least on the Christianity side)... I haven't played D&D in about 10 years.

      Back in my day we have 1 edition and we liked it that way. :-)

      --
      You are in a maze of twisty little passages, all alike.
  90. If there are bugs by Exter-C · · Score: 1

    If there are bugs the wide spread adoption in using PHP with Apache 2.x would be more beneficial as it will resolve the bugs in a much more timly fashion.

    I guess this is the joy of the world.. friction..

  91. mod_lisp by stesch · · Score: 2, Interesting

    Well, mod_lisp was a good reason to stay with Apache1. But there was some work done on the Apache2 version of the module, so it should be all clear to upgrade to Apache2, if you need it for more than just serving to your lisp image.

  92. The bloat is BEFORE sendfile() by wtarreau · · Score: 2, Interesting

    For most web servers on Linux, once the server has figured out what static file to send, it calls sendfile() and the rest of the work is entirely in the kernel

    The problem with apache performance lies in everything that it executes *before* sendfile() is called. Sure you'll be able to serve *ONE* static file at wire speed, but when it comes to serve *many* files per second, the initial overhead puts the foot on your way.

    And unfortunately, apache is not good either for serving large files because of the important memory (and scheduling) cost of each concurrent thread (or process in case of preforked). Apache is good as an application server, not as a static content server.

    willy

  93. For me ... by Pegasus · · Score: 1

    The lack of simple inteligent proxies and load balancers such as mod_backhand for Apache 2.0 is a major show stopper. There's simply no large enough machine (for limited budget) that would be able to handle the load. And i find other load balancing solutions inferior.

  94. SSL - Apache 2 steps into the lead by freezin+fat+guy · · Score: 1

    Anyone else notice that Apache 2 seems to perform significantly better for sites which use a lot of SSL encryption?

  95. Re:I'm sorry Bruce, you'll have to come back later by Anonymous Coward · · Score: 0

    Best /. post, ever.

  96. changes how things are done, and not what is done by PhYrE2k2 · · Score: 3, Insightful

    Apache 2 changes CORE functionality- great! But that doesn't really affect what it does, but rather how it does it. Maybe if it implemented some new HTTP 1.2 I would get it in there... but who'd notice?

    Apache1 has been tried, tested, and true and has reached a lovely 1.3.33 version, of which security patches are rare and bugfixes are also rare. Similar situation with mod_ssl. So why leave your nice warm, structurally stable house in favour of the blistering cold to try something new that has a new version for bugs and security on a much more common basis? Personally, until Apache 2 gains some serious market share, I see no reason to leave. We provide hosting- and need reliability, and can't be wasting time with constant updates (though updates are better than not fixing of course) when we could otherwise stick with Apache 1.

    Apache1 does one thing, and does it well. Period. Sure there are crazy new features of Apache2, and I've tried them else. Personally, I see nothing compelling to move at this point. There are a few small 'that would be nice' features, but really nothing exciting in the way of Linux2.6, WindowsXP, etc. Even 2.6 is having slow adoption. You can only find it on workstations, because no supportive provider is about to live on the bleeding edge and leave their customers bleeding. Apache on the other hand doesn't have a place on the workstation (unless it doubles as a causal server), so in the same way, you're trying to get those folks who prefer stable releases (like Debian stable) over bleeding edge.

    So why switch?

    "Bad press leads to lots of misinformed morons saying stupid things about how Apache 2 is not ready for prime time." -- I guess I'm one of those morons. Personally I'm not about to replace one of the core pieces of software between us and our customers with something that hasn't proven itself to me. We've set it up in testing environments, and found that it performed similarly and didn't offer anything new we need.

    --

    when you see the word 'Linux', drink!
  97. PHP suExec is available. by kbahey · · Score: 2, Interesting

    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.

    suExec for PHP is available. My ISP has switched to PHP suExec several weeks ago. I noticed that something was different when cookies was not set properly, and the PHPSESSID was set in the URL (ugly, so I noticed).

    This facility makes PHP runs as the user him/herself, instead of the Apache user (just like you wanted). This is a more secure environment for sure.

    You need to have a php.ini file with the parameters you want, in your public_html directory, to override the defaults (e.g. how the PHPSESSID is handled, by a cookie, or in the URL, how long a session is valid for, ...etc.)

  98. Re:Using PHP on Apache 2.0 right now. (MOD PARENT by greenskyx · · Score: 1

    Very cool solutions. There seems to be a lot of ppl bitching about it that have been modded up. Someone please Mod this up so people can find out about these two solutions.

  99. Re:I'm sorry Bruce, you'll have to come back later by c0p0n · · Score: 1

    Good, since I didn't even read your post ...

    --

    Your head a splode
  100. Rewriting libraries by Bruce+Perens · · Score: 2, Informative
    What we are asking for in these rewrites is for what are presently global variables to be made part of a structure that is allocated per-thread by a library call and then passed to all calls to that library as an argument. You don't have to use any magic POSIX thread-local memory stuff to do this, and it's portable. No software logic need change. If this point is made effectively to the maintainers of these libraries, they'd do it.
    If the thread gets destroyed or exploited outside of PHP in one of these other libs, HOW is that PHP's fault?
    Some programs do unwind context on catching a signal. Especially those that provide an exception mechanism.

    It still seems to me to be an architecture issue.

    Bruce

  101. Re:Apache is ignoring the killer reason for Apache by Chupa · · Score: 1

    If you get perchild working, let me know. As far as I can tell from trying to use it is that it is broken (at least on linux), and no one is doing anything to fix it--I haven't seen anything in the changelogs about it for a while now, anyways.

  102. Re:I'm sorry Bruce, you'll have to come back later by Bruce+Perens · · Score: 1

    That's OK, you're only a figment of my imagination anyway :-)

  103. er, no... by MenTaLguY · · Score: 3, Informative

    Kill-9ing does not always clean memory, open files, sockets, etc.

    Yes it does. The only exceptions are SYSV IPC objects which don't get automatically reaped, and temporarily created filesystem objects that still have links.

    Assuming your kernel isn't buggy, anyway.

    --

    DNA just wants to be free...
    1. Re:er, no... by p0r0ng · · Score: 1
      Yes it does. The only exceptions are...

      so, from your own words, sigkilling does not always terminate processes cleanly.

    2. Re:er, no... by arodland · · Score: 1

      and also by the parent post's own words, everything the grandparent post said was wrong, except for possibly the etcetera.

  104. PHP-as-CGI doesn't work on many web servers by Luke+Mewburn · · Score: 2, Interesting
    Except PHP-as-CGI relies upon a "non standard" CGI variable (SCRIPT_FILENAME) to operate correctly, and many non Apache/IIS web servers don't provide that variable. Thus, PHP doesn't work under them.

    I worked out this problem a while ago, submitted bug 28227 with fix, and it's been sitting in the PHP bug database doing nothing for months. Not only that, but many similar bugs (without fixes) were closed prematurely by the PHP team under the incorrect assumption that the submitter's system was misconnfigured, as opposed to PHP being buggy...

  105. this is untrue. by vena · · Score: 4, Informative

    from the docs:

    Do not use Apache 2.0.x and PHP in a production environment neither on Unix nor on Windows.

    1. Re:this is untrue. by Anonymous Coward · · Score: 0

      I'm glad I didn't read that before I upgraded all of my (half dozen or so) production webservers to Apache 2.0. They all run PHP. The sky has not, in fact, fallen. There are probably some quirks/problems that 1.3 didn't have, but there are also alot of great new features.. Test It Yourself!

    2. Re:this is untrue. by Anonymous Coward · · Score: 0

      It says don't use it with php 4.2.3 with apache 2.0. In fact it says:

      However, the recommended setup is to use PHP 4.3.0 or later with the most recent version of Apache2.

  106. Re:I'm sorry Bruce, you'll have to come back later by c0p0n · · Score: 1

    That's OK, you're only a pigment of my imagination anyway :-)

    I hope I'm not the acetylen-blue one ... I _hate_ that color.

    --

    Your head a splode
  107. Re:Apache is ignoring the killer reason for Apache by mcrbids · · Score: 1

    Actually, I put in the wrong link. I meant to say that this is where active development is happening.

    He says it works well on his modest server. I'm going to be trialling it in a production environment, one site at a time.

    -Ben

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  108. Apache2.0 = XFree86 by mnmn · · Score: 2, Interesting

    Fights between opensource projects are always sad. Part of the openness is use it however you like... recommendations are opinions. ASF isnt quite blocking PHP yet, but things can go wrong as we've seen in the case of jboss and xfree86.

    Whats stopping anyone from uniting php and apache1.3 and packaging them together for each platform the way sqlite was incorporated into php? They go well together, makes alotta sense to be the same project.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
  109. The issue is marketing rather than technical by Anonymous Coward · · Score: 1, Insightful

    ASF made a couple of mistakes in marketing:

    o Apache2's biggest competitor is Apache1
    o Making it run better on Windows does not win any market share for Apache2, since the installed base is Apache1
    o Apache1 is being used on production servers, where people's jobs are on the line. No one really wants to be first unless there is a issue to be solved.
    o MPM was mistakenly focussed upon as the selling feature. Just because MPM took the most effort doesn't mean it is the most compelling feature!
    o Apache2 made the golden mistake of breaking the platform. Apache is a platform, because a lot of other software is built on top of it. The inability of Apache2 in its early development stages to be backwardly compatible with the Apache1 modules mean there wasn't much chance for people to test how Apache2 would behave in their original configuration. Currently, in many people's mind, Apache2 is being 'beta-tested' with PHP in the sense there are no real world data of PHP performance against Apache2.
    o Apache2 may have broken compatibility with management tools that ISP uses as well. This again lowers the value of a platform.

    Steps to take:
    o PHP's biggest customers are ISPs. If Apache2 were adopted by ISPs then, all problems are solved. Partner with a large ISP, so that there are some sites running on Apache2 + PHP + other modules in their system. Offer to run profile information and offer round the clock support if the system goes down (see the problem with free software?) and publish good documentation + case studies based on this, so that other ISP's could migrate their systems over.
    o Let's face it. Any code rewrite is going to break something - wrt to third party software. Somewhere. Apache2 being totally silent on this is being not credible. It simply points to the lack of adoption, and hence no one knows what is broken.
    o I can't believe a ground up rewrite is not capable of offering any improvement. Apache2 has to study the key weaknesses in Apache1 either in resource consumption, scalability or performance to demonstrate what benefits can be achieved. Some real world benchmarks would be useful here.
    o Failing all the technical marketing, Apache2 could focus on some hype. Get ISPs to differentiate themselves with "Runs on Apache 2" campaign, pointing out other ISPs are still running on "Apache 1".

  110. .I don't care by Kirth · · Score: 1

    I've been runing Apache 2.x with PHP for months. It works nicely, so I really don't care about some problems which might turn up when some dorks try to run non-threadsafe crap. I just hit them users. ;)=
    --

    --
    "The more prohibitions there are, The poorer the people will be" -- Lao Tse
  111. Tomcat is worse by jrumney · · Score: 1

    Tomcat (also an Apache Foundation project) is even worse. It seems that 3.3, 4.1, 5.0 and 5.5 branches are all still active.

    1. Re:Tomcat is worse by (H)elix1 · · Score: 1

      Tomcat (also an Apache Foundation project) is even worse. It seems that 3.3, 4.1, 5.0 and 5.5 branches are all still active.

      With the first three, each corresponds to a set of JSP/Servlet specifications. If I'm coding JSP tag libraries for BEA 8, I'm going to use Tomcat 5.0 since both support the JSP 2.0 specification. If I'm building code that will target WebSphere 5.0, I'll use Tomcat 4.x series. Tomcat 5.5 seems to be a bit of an odd duck - it requires the JDK 1.5 to run, so they must be using some of the latest greatest Java 5 stuff. Nothing that I've seen in the commercial application server space yet, but I'd suspect BEA 9's JSP/Servlet engine will look similar.

  112. The reason we can't migrate to Apache 2 by Richard+W.M.+Jones · · Score: 1
    Please fix this issue, which has been outstanding for more than 2 years, then get back to me. (Oh yes, and there's even a working patch, but the Apache developers won't integrate it).

    http://issues.apache.org/bugzilla/show_bug.cgi?id= 27550

    http://merjis.com/developers/mod_caml/apache_2.0

    Rich.

    1. Re:The reason we can't migrate to Apache 2 by FireChipmunk · · Score: 1

      uhm. This was fixed in our Subversion Trunk last week

  113. Its all wrong by Tobias+Luetke · · Score: 1

    All of this discussion is based on a flawed idea of mod_php. Why oh why you want to have an scripting virtual machine embedded into the software which handles web requests is beyond me. People constantly complain that PHP can't run as a different user then apache. People constantly complain that PHP doesn't pool db connections.

    There is a simple solution for you : Fix your bloody setup

    Fastcgi has been out since 99. It spawns as many PHP processes as you want to pool. It gives each php process its own process so no multithreading problems can possibly occure. You can use apache1, apache2, boa, lighttp as your web server, they all work.

    There is NO downside to using fastcgi. In my tests it even offers a 40% (!!) performance gain when you use pconnect ( which you can use now since your php processes are now pooled ) and your server now supports every scripting language on the planet becuase every scripting language worth a damn can use fastcgi.

    installed mod_php is a clear sign of a flawed setup.

    1. Re:Its all wrong by lordfener · · Score: 1

      Well, thank god you're here to help us! :) Fastcgi doesn't solve all problems. Pconnect is not always a good way to connect to a database. Clearly, every set up is different and has different requirements. CGI also has shortcomings that mod_php does not have.

  114. Web-Dav support and subversion by JPyObjC+Dude · · Score: 1

    When accessing subversion using web-dav, you must run Apache 2 as documented here [big page]

    Using web-dav and subversion is a must if you need firewall transparency. Although I found that the http sniffers on my corporate network actually slowed down my repo so I use svnserve instead (no apache / web-dav needed)

  115. Apache 2.0 and PHP - rock solid by halfelven · · Score: 1

    I'm using Apache-2.0.51 and PHP-4.3.10, with several typical PHP apps (webmail, photo gallery, whatever).

    No problem whatsoever. I have no idea what all the fuss is about.

  116. Re:Apache is ignoring the killer reason for Apache by coj · · Score: 1

    I entirely agree. I really, really wish more resources would be dedicated to this, because it was one of Apache 2's shining hopes when it first was released. At least to me. 8)

  117. One good (future) reason... by buddha42 · · Score: 1
    I really wish the MPM could be worked out to operate in a suexec like fashion where each virtual host got its own process owned by a specific user for that virtual host.

    This is particularly important to PHP and webhosts/mass-virtual-hosters. The current model is to use things like safe_mode and openbasedir and limiting certian functions like exec(). Thats a very hacky way of trying to solve the problem of multiple users applications running as the same user without being able to mess with each other. Just saying out loud makes you realize how much a fix is needed.

    Its also why any host worth its fees has to run php as a cgi rather than a module.

  118. One module makes it worth it: mod_deflate by Spoke · · Score: 1

    One module makes the switch to Apache 2 worth it from Apache 1: mod_deflate. While there is mod_gzip available with Apache 1, it does not integrate or perform nearly as well with Apache as mod_deflate.

    For example, you can not serve SSL content with mod_gzip (well, you can with some tricky usage of virtual hosts at a large performance hit).

    mod_deflate plays nicely with PHP, Tomcat (mod_jk) and every other module I've tried, and it results in a huge bandwidth savings for most sites and also reduces page download times.

    For those who aren't familiar with mod_deflate or mod_gzip, mod_deflate compresses content before sending it to the client, and most HTML content is *very* compressible. It's not uncommon to see compression ratios of 10:1 or better.

  119. How to install PHP on Apache 2 by dananderson · · Score: 1
    Instructions to install PHP on Apache 2.x UNIX/Linux-class systems are at http://dan.drydog.com/apache2php.html

    BTW, the problems PHP has with Apache 2 is the MTM model. If you won't use multithreading, you're OK. If you use MT, make sure the underlying libraries you compile in or use with PHP are MT-safe.

  120. Don't use PHP With Apache 2? by DarkKnightRadick · · Score: 1

    I don't see why not. I use Apache2 exclusively with PHP and have never had any problems with PHP or Apache.

    --
    "There is a way that seems right to a man, but its end is the way of death." Proverbs 16:25 (NKJV)
  121. The real question is... by Anonymous Coward · · Score: 0

    if PHP 1.0 runs well with Apache 2.0, why bother changing PHP version?

  122. my site by Bauguss · · Score: 1

    For what its worth, here is my 2 cents.

    I upgraded our production site to php5.0 with Apache 2 a while back. (shameless plug - t-shirtking.com)

    We recently had an AP wire article released about a t-shirt of ours. It went on the front page of cnn.com and msnbc.com.

    It handled 47,709 unique sessions that day (1,987.88 hourly) on a p4 hyperthreaded server with 2gb of memory. Although it created a slashdot effect, the server stayed alive during the event and many people were suprisingly patient enough to order. (we threw the drive in a dual xeon machine in early afternoon, that helped a bit) I was extremely pleased with how it performed. The server never crashed. (note, the db is on its own machine..MySQL4)

    Granted, we don't use pretty much most of the plugins.

    Here is my compile settings. ./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/usr/local/lib --disable-debug --with-mysql=/usr --enable-ftp --disable-cgi

    Now, what I was suprised with is what I learned that day about apache config. This is what I used. ./configure --enable-modules=all --enable-ssl --enable-so

    Notice that this doesn't disable all the apache mods that you never use. So I could have actually had a leaner apache running on top of everything else.

    My opinion, Apache2 and php5 works really well together for us. It allows us to run a site on 2 machines giving us a very low cost. Not to mention I can add a 2nd apache server very quickly with round robin dns to help spread the load in a generic way.

    Anyway, hope that is useful to someone.

    Josh

  123. Re:Check PHP.org Sever by Zey · · Score: 1
    Might be relevant if www.php.org were the PHP homepage.

    Actually www.php.net is and their Netcraft result shows they're using Apache1.

  124. Wha about new install? PHP not fair. by Anonymous Coward · · Score: 0

    The PHP doc says:
    "Do not use Apache 2.0.x and PHP in a production environment neither on Unix nor on Windows."

    And all the PHP arguments explain that there is no compelling reason to switch from 1.3.x to 2.0.

    But what's wrong with installing Apache 2.0 + PHP for a brand new install? It looks like there nothing wrong with it.

    ==>The PHP doc should be fair and at least recognize this.

  125. Apache 2 will eventually win by 808140 · · Score: 1

    It'll just take a while. But CVS is dying, and Subversion, its logical successor, does not run with Apache 1.3. And in our increasingly firewalled internet, subversion's apache-based access means that if you can surf the web, you can checkout subversion repositories, commit changes, etc.

    It's much more convenient than cvs, especially for anonymous access (typical of open source projects).

    Apache 2 has suffered from the critical mass catch-22: "I won't use it until it's better tested, deployed in more production environments, etc". Because there hasn't been a compelling reason for most people to use Apache 2, they haven't switched, prefering to stand by the age old "if it ain't broke don't fix it" wisdom.

    Subversion offers that compelling reason. Many opensource hosting sites (such as sourceforge) sustain a huge number of hits per day. As subversion displaces CVS, these sites will begin to support it, and I would not be surprised if they begin running Apache 2 as their standard web server to kill two birds with one stone.

    I switched to Apache 2 for subversion support. I can't be alone.

    As for PHP, well, I hate to say this, but PHP's authors can't be bothered to make their module threadsafe. I know, I know, they link to libraries that might not be thread safe, but as any developer knows, there are many ways to work around possible race conditions (using locks and such) and make the system stable. That's how other programming languages (like perl and python) do it.

    PHP is suffering from bitrot, plain and simple. The world around it is changing and it needs to change too. Its developers know this will be a ton of work, and so they resist it. And PHP suffers from the talent problem -- PHP is too easy to use. Bear with me for a moment -- this means that many PHP users are not technically competent enough to hack up a thread safe version of PHP, or aid in its development (this is far less true of the Perl, Python and Ruby communities).

    Personally, I use mod_perl. Very nice. PHP has some good points, but some dedicated people are going to have to pull it into the 21st century or it will get left behind. Not being thread-safe is simply not acceptable these days.

    1. Re:Apache 2 will eventually win by Anonymous Coward · · Score: 0

      There is no compelling reason to use subversion.

      It has a few things that are better, and a lot of things that are more complecated.

      I have been "the cvs guy" at two workplaces, and I have also done contract work setting up cvs and teaching people how to use it for two other companies. Recently, each time I set up a repository I have looked at subversion again to see if we shoudl use it; however, there is no reason.

  126. The Great Unknown PHP Thread-Safe Danger by Anonymous Coward · · Score: 0

    The root of the problem is that the PHP Group has made no effort to document what extensions are thread-safe and which are not. Read the comments anywhere about this and they are all hypothetical. There is no list of thread-safe and non-thread-safe extensions. If there was such a list people could make an informed decision about what to use. Given how long Apache2 has been out, it is pretty clear that the PHP Group does not want people to know this information.

  127. Apache wants to make sure people upgrade because.. by Anonymous Coward · · Score: 0

    they want to make sure everyone is nice and compliant about upgrading when they decide to take httpd over to java like all the other java kool-aid they are selling --- Maven is Jonestown, lets all program in XML because its standard! Cultures breakdown when there is too little disent and questioning of authority, the apache foundtion is headed in that direction.

    Lets move on, SOA and all that, most people don't need any of this mod_* crap and could use:
    thttpd he has other servers there, too and http_load.
    lighttpd I'm moving to this sweet little server for most apps and the home site runs ea php and ruby on rails
    AOLServer like OpenACS runs on
    Boa
    fnord from our boy who did the (in)famous benchmarks
    Cherokee I root for this one for some reason.
    gatling
    cthulhu
    yaws in erlang, should support more simul. connections than the unlying OS can support.
    dhttpd
    Litespeed check out their php benchmarks
    thy
    roxen
    mini-httpd never tried this one
    xitami I have a intranet server running for 5 yrs (without upgrading xitami) on xitami Solaris, simple, small, easy to admin, never dies max uptime was 1000 days+.
    eddiefor complex load bal and geographic distribution
    hiawatha

    And for the love of god, please at least design your sites to get their images from images.mysite.com if possible so that you can use a non-bloatware web server to server the images, reserving horsepower on your apache server for stuff that actually _requires_ some features of apache.

    http://www.hcsw.org/awhttpd/ updated on 12-06-2004
    http://www.norz.org/zawhttpd.html
    http://cr.yp.to/publicfile.html

  128. Using filter chains by Anonymous Coward · · Score: 0
    Filter chains are the kind of thing where if you don't know that they're there, you might get by without them, but once you recognize the possibilities, there's no going back. For me they are the killer feature that spurred me to adopt Apache 2.

    As one example, I have some dynamically generated content on the server that references a hard coded URL which has since moved. I don't have source code or even machine level access to the content generation mechanism. On Apache 1 it would have taken a fairly large effort to fix the bad URL. On Apache 2, just stick a little substitution script in the filter chain, and it's done.

  129. Immaturity is the basis of this story. by ShadowRage · · Score: 1

    looking at this, the apache guys are pissed because someone isnt going on a spazzfest on how awesome their software is.. but look at the words, php isnt saying not to use php at all with 2.0, but not to use it in a production environment. (ie, dont run it on your website that serves millions of customers a day)

    Apache's reacting as if php is saying not to use apache whatsoever. Shows the immaturity of the developers. "ZOMG! YOU ARENT GOING TO SHOW COMPLETELY LOYALTY TO US! WE'RE GONNA BITCH AND CRY AND TRY TO TARNISH YOUR NAME."
    It's all insecurity among the devs.
    It's not like they're not going to ever support it fully for apache 2.. the current setup just doesn't yet.

  130. Quit maintaining Apache 1.3.x by Anonymous Coward · · Score: 0

    Obvious solution. Quit maintaining Apache 1.3.x. If 1.3.x tree is no longer trustable and not upkept from possilbe security vulnerabilities, then it can simply die off and everybody will be forced to upgrade. Life cycle managment. Learn it. As soon as 1.3.x is no longer supported, it doesn't matter what the problems may or may not be with 2.x.x as people will switch over anyway. Fricking retards. Thats right, flame the messenger.

  131. From a webhosting standpoint... by bedessen · · Score: 2, Informative

    If you know anything about webhosting you know that cPanel/WHM (and competitors, e.g. DirectAdmin, Fantastico, etc) still support the stodgy old Apache 1.3/mod_php model. The vast majority of sites out there run on cPanel or some other type of shared/reseller type of control panel/managed hosting software. Until this changes, don't expect Apache 2.0 to make any inroads.

    That said, everyone should hope 1.x to die ASAP. Basically the Apache developers have to do double duty maintaining two completely seperate branches. If everyone could let 1.3 die then there would be a LOT more manpower available to concentrate on 2.0. For many many years they have said that no new features are going into 1.3 -- everything is happening on 2.x. Yet they still have to maintain security fixes and chase down bugs on the 1.3 branch which is very creaky. There is a reason, after all, that they decided to rewrite everything for 2.x.

  132. Multiviews and 406 errors by Anoraknid+the+Sartor · · Score: 1

    There is one very good reason to move to Apache 2 under php: If you use multiviews, with the standard httpd config file Addtype addition for php of:

    AddType application/x-httpd-php .php php3 php4 phtml

    then sites will throw 406 errors. Some bits of google (the keitai proxy, for a start) don't like this AT ALL!

    There is a workaround for Apache 2, but not (AFAIK) for Apache 1.3 (see here for more info: http://tranchant.plus.com/notes/multiviews

    My sites rely on /file.php/some/thing/here/ being parsable as /file/some/thing/here/ - and for that I THINK you need multiviews (please let me know if there is a better way...)

    --
    Find Japanese addresses in English on Google Maps Japan: http://diddlefinger.com/
  133. That's just wrong by Anonymous Coward · · Score: 0
    Apache 2 and a recent Linux kernel come pretty close to the theoretical limits of the hardware when it comes to serving static content

    Oh, no. You cannot have tried this in practice. Apache still suffers heavily under load. Heavy load makes response time skyrocket. Benchmark against Gatling -- now there's a fast web server!

  134. No. by Anonymous Coward · · Score: 0

    No. I have found that it performs the same. Kinda makes sense since its just openssl doing the actual work.

  135. That's retarded. by Anonymous Coward · · Score: 0

    How about if you want reasonable performance, use a webserver that doesn't blow? Worker MPM is a pathetic like 4% faster than apache1 for me here. If I need performance I use lighttpd, or put squid in front of apache.