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

324 of 465 comments (clear)

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

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

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

    6. 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
    7. 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.
    8. 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
    9. 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.

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

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

    12. 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
    13. 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"
    14. 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."
    15. Re:PHP used to be an ASF project by lewp · · Score: 1

      Oh, now I get it.

      --
      Game... blouses.
    16. 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
    17. 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.
    18. 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.
    19. 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
    20. 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!
    21. 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!
    22. 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.

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

    24. 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"
    25. 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
    26. 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!
    27. 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
    28. 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.
    29. 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 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
    4. 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.
    5. 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.
    6. 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?
    7. Re:apache2 is essential for Windows by Zorilla · · Score: 1

      ..or not the boss.

      --

      It would be cool if it didn't suck.
    8. 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
    9. 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

    10. Re:apache2 is essential for Windows by Microlith · · Score: 1

      What would you prefer we run?

      IIS?

      Thanks but I'll run Apache.

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

    13. 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.
    14. 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
    15. 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.
    16. 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)
    17. 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)
    18. Re:apache2 is essential for Windows by Evil+Grinn · · Score: 2, Funny

      Anyone who wants to keep his nuts will use Apache2.

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

      Mornington cresent Oh sorry wrong joke.

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

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

      In Soviet Russia, Windows nuts YOU!

    22. 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.
    23. Re:apache2 is essential for Windows by swv3752 · · Score: 1

      But in Russia Apache runs Windows.

      --
      Just a Tuna in the Sea of Life
    24. Re:apache2 is essential for Windows by osu-neko · · Score: 1

      "Nuts." -- Gen. McAuliffe

      --
      "Convictions are more dangerous enemies of truth than lies."
    25. 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.
    26. Re:apache2 is essential for Windows by kayen_telva · · Score: 2, Funny

      Apache can run farther on nutz than windoze.

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

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

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

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

      Any Apache2 nuts wants to keep.

  3. 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 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.
    4. 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
    5. 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.

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

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

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

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

    11. 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
    12. 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
    13. 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.

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

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

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

    18. 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
    19. 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 ...
    20. 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.

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

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

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

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

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

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

    10. 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.
    11. 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.
    12. 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

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

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

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

    16. 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
    17. 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
    18. 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.

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

    20. 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...
    21. 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 :(.

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

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

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

      Are you the real Bruce Perens?

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

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

    29. 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.
    30. 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
    31. 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
    32. 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
    33. 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
    34. 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
    35. 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?

    36. 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
    37. 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.
    38. 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.

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

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

    7. 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
    8. 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
    9. 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.
    10. 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.

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

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

  10. 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.
  11. 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?

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

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

    4. 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
    5. 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?

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

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

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

    9. 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.
    10. Re:Why are there two?? by babybird · · Score: 1

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

      --
      Keith D.
    11. 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.

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

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

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

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

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

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

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

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



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

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

      --
      Advanced users are users too!
    7. 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.

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

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

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

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

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

    9. 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.
    10. 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?
    11. 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?

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

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

  28. 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
  29. 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!
  30. 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.
  31. 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.

  32. 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?
  33. 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
  34. Re:Oblig. by temojen · · Score: 1

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

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

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

  38. 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.
  39. Re:Note to Slashdot moderators by snipersock · · Score: 1

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

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

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

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

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

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

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

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

  49. 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 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
  50. 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!"

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

      --
      :(){ :|:&};:
  52. 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
  53. 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.
  54. 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.

  55. 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
  56. 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.
  57. 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

  58. 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!
  59. 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

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

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

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

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

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

  65. 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
  66. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

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

  68. 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.
  69. 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
  70. 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.
  71. 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
  72. 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)

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

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

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

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

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

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

  80. 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!
  81. 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.)

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

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

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

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

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

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

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

  90. 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
  91. 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.
  92. 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
  93. 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".

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

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

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

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

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

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

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

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

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

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

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

  107. 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)
  108. 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.
  109. 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

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

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

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

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

  114. 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 */

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

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

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