Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Software Apache

Apache 1.3.x vs. 2.0.x: The Debate Returns 95

darthcamaro writes "internetnews.com is running a story about the new Apache 2.0.49 release. They actually got a hold of a pair of Apache Software Foundation members and got them to speak out about the 1.3.x vs. 2.0.49 debate! Also Apache Director Sander Striker told internetnews.com that he expects the Apache 1.3.30 release cycle to begin this week... I still use 1.3.x because I've been using the Apache 1.x series 'forever' and I've never found a solid reason to change. Also, as pointed out in this article, the official PHP documentation clearly states, 'Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows.'"
This discussion has been archived. No new comments can be posted.

Apache 1.3.x vs. 2.0.x: The Debate Returns

Comments Filter:
  • by a.koepke ( 688359 ) on Monday March 22, 2004 @11:23PM (#8641476)
    The PHP manual link posted is a direct link to one of the Canada mirror servers. The PHP site is mirrored around the world and it automatically selects your nearest mirror server.

    Use http://www.php.net/manual/en/install.apache2.php [php.net] instead so that it can select the nearest mirror server and save us slashdotting this one Canadian server :D
  • by Anonymous Coward on Monday March 22, 2004 @11:27PM (#8641495)
    Purple and mustard yellow? What the hell were you people thinking?!
  • by leviramsey ( 248057 ) * on Monday March 22, 2004 @11:33PM (#8641523) Journal

    ...and haven't noticed any problems. Why is this advised against?

    • by Dr.Dubious DDQ ( 11968 ) on Tuesday March 23, 2004 @01:51AM (#8642318) Homepage

      It seems to be not the 'core' of PHP, but several of the modules that go with it aren't thread-safe.

      Apparently, this really only shows up in the real world under heavy usage, and using the prefork "multi-processing module" should reduce or eliminate the potential problems. I think.

      It SOUNDS like the warnings about not using PHP with Apache2 is mainly overcautiousness - every time one of these stories comes up, a few people pop up and say it's working fine for them, and I don't remember seeing anyone pop up and say "yeah, every time I get more than (x) connections at a time everything fails" or anything of the sort.

      I'm planning to try it out myself sometime soon...

    • There are regular reports on the Horde/IMP lists that PHPs gettext component is broken. As the other poster says, this is some how thread related; PHP not being thread safe. There is at least one report of languages that change within a single page... But it seems that this only happens under heavy load.

      It would be interesting to know if PHP 5 will be thread safe, and this usable in production with Apache 2.x

      • PHP will probably NEVER be thread safe.

        Even if PHP were 100% threadsafe, it generally uses too many libraries for it to be practical to make sure they're ALL threadsafe.
        • by sumbry ( 644145 ) on Tuesday March 23, 2004 @02:47AM (#8642547) Homepage
          Even if PHP were 100% threadsafe, it generally uses too many libraries for it to be practical to make sure they're ALL threadsafe.

          Actually the PHP core is 100 percent threadsafe now, it is only specifically the external libraries which aren't.

          If you use PHP w/FastCGI support you wont run into these issues. If you only compile MySQL or Postgres support into your PHP you wouldn't either. But many users frequently also compile in other external libs for things like graphics generation, url manipulation, etc and its these libraries which aren't thread safe and specifically can cause problems in high use environments.

          While you could specifically use PHP and Apache2 in total prefork mode, this basically makes it run exactly like the 1.3 series, so then the real question is what's the point of upgrading at all and not just sticking w/1.3?
          • While you could specifically use PHP and Apache2 in total prefork mode, this basically makes it run exactly like the 1.3 series, so then the real question is what's the point of upgrading at all and not just sticking w/1.3?

            Because some servers like the subversion apache module require apache2, and I'd like to not have to run both apache1.3 and 2 in parallel. I am curious as to why the php documentation doesn't mention that using the prefork mpm and php would work fine however.

          • Given that Apache development is predictably
            going to continue on the 2.0 branch (which is
            a questionable point of departure), keeping
            your site secure with minimum maintenance cost
            requires using binary releases on the 2.0
            platform for web applications.

          • If you only compile MySQL or Postgres support into your PHP...

            You know what? I've been trying to do this very thing for two days now and I can not get Apachetoolbox to compile a pgsql.so so I can have a working PHP installation w/ pgsql support. I have to have this tomorrow and I can not find any place that makes any mention of this. It is ubber annoying. This one stinkin' little shared library is holding up the entire project. :-(

            • Well I'm not too familiar with Apachetoolbox, but if you just compile Postgres with default options it will pretty much generate a .so that it places under $PREFIX/lib/plpgsql.so

              • Thanks for the reply. That's not the .so I'm after. The one I'm trying to get compiled is the PHP shared library that PHP loads for pgsql support, pgsql.so ATB is a really handy program that makes it quick and easy to compile and install any number of known Apache modules and accessories. No muss no fuss. Apache gets preconfigured for it and all. That's the pretty intro to it. The other side of the coin is that it doesn't always work. I'm going to have to dump it one of these days and go back to bui
      • by gabe ( 6734 ) on Tuesday March 23, 2004 @09:26AM (#8643895) Homepage Journal
        Since PHP 4's inclusion of the Zend Thread-Safe engine, PHP itself has been thread-safe. It is the third-party libraries that extensions link to that are non necessarily thread-safe.

        There's a list of libraries and whether or not they are known to be thread-safe here: http://httpd.apache.org/docs-2.0/developer/thread_ safety.html#liblist
    • I've been running it on WinXP without any problems either.
    • by xneilj ( 15004 ) on Tuesday March 23, 2004 @11:01AM (#8644732)
      The subject of Apache 2/PHP was raised in the Slashdot discussion of the PHP5 beta RC a few days back. One comment [google.com] from a PHP dev (Rasmus) was:

      Apache2 has a number of different modes it can work in. These modes are called MPM's. The default MPM is called Worker which is a multithreaded model. PHP, mod_perl, mod_python, and any other similar technology which links directly into the httpd processes will need to be perfectly threadsafe and reentrant to work effectively with a threaded Apache2 mpm. This is doable for the core of PHP, but there are literally hundreds of 3rd party libraries that can be linked into PHP and nobody whether or not these libraries are threadsafe. And figuring out if a specific library is threadsafe or not is non-trivial and it can very from one platform to another. And just to make it even harder, this stuff will appear to work fine until you put it under load or hit very specific race conditions which makes it nearly impossible to debug.

      So, since we can't tell you for sure that a threaded Apache2 mpm + PHP will work we do not suggest you use it for a production server. And since we can't know for sure, none of the main PHP developers use this combination for our own servers which compounds the problem because it is not receiving anywhere near the amount of realworld testing required to work out all the little issues above and beyond this threading unknown.

      There is an Apache2 mpm, called "prefork", which isn't threaded and basically makes Apache2 look like Apache1. But hey, we have a very good server already that looks like Apache1.

      In the end I don't see Apache2+PHP ever becoming a production platform with the current architecture. The only way I see it ever working is to pull PHP out of Apache and use a fastcgi approach. Or, with time, perhaps we will learn how to make sure a library is perfectly threadsafe and safe to use in a multithreaded Apache2.

      For now, I really see no reason not to simply use Apache1 if you want a robust, fast and stable web server.

      One of the posters [slashdot.org] found this [php.net] more recent comment from Rasmus as well:

      We are not talking about just Apache2 here. We are talking about Apache2+an MPM+PHP+3rd Party Libs. The folks at apache.org are only concerned with Apache2 itself, and for serving up static files it is better than Apache1 in many respects. However we have to worry about a lot more stuff here. In fact, we couldn't care less about serving up static files. The main issues as I see them are:

      1. Thread safety issues. - It is very difficult to track down threading problems and we don't have decent tools to help us. The thread safety of many 3rd party libraries are unknown quantities and can depend on the OS, libc and even compile flags. - Many distributions seem to ship with the Worker MPM as the default and that is the MPM that gets the most attention. This is a hybrid multi-process, multi-threaded MPM.

      2. You can eliminate the threading problem by running the prefork MPM which effectively makes Apache2 behave just like Apache1 in the way it forks processes and serves one request at a time per process. Issues here: - Apache2 itself is rather fringe still. It has approximately a 5% marketshare vs. 65% for Apache1 at the time of this and out of that I would guess the majority are running the Worker MPM. So we are talking about a fringe MPM in a fringe server. This means it has not had anywhere near the attention from people running large production web server farms that it needs for me to comfortably say that this is a solid piece of code with all the kinks worked out. - The benefits of moving to Apache2+prefork are questionable. The new filter API would be one of the benefits, but it sti

      • Apache2 itself is rather fringe still. It has approximately a 5% marketshare vs. 65% for Apache1 at the time of this and out of that I would guess the majority are running the Worker MPM. So we are talking about a fringe MPM in a fringe server.

        In fact, Apache 2's default MPM [apache.org] on unix is Prefork [apache.org], which should work the same way as Apache 1.3, but with several improvements of Apache 2 [apache.org].

        My personal opinion is that the PHP development team should tackle thread-safety, but even if they don't they should updat

      • You can eliminate the threading problem by running the prefork MPM which effectively makes Apache2 behave just like Apache1 in the way it forks processes and serves one request at a time per process.

        I can't entirely agree with what Rasmus is saying here. The code for handling of the incoming requests in the MPM is entirely new, cleaner, leaner and better in every respect than Apache 1.

        Also, what Rasmus is saying makes one believe that threading is what Apache 2 is all about. First, Apache 1 can be thr

      • I suppose that for thread-safe implementation one could look at AOLServer. While it won't address PHP issues (one can use PHP with AOLSErver all the same, but the same trhread-safeness argument applies), a built-in Tcl interpreter is probably more than enough to replace the LAMP (with LAPT (Linux/AOLServer/Postgres/Tcl) :)).
  • by Anonymous Coward on Monday March 22, 2004 @11:48PM (#8641607)
    I did this after figuring out that no one really knew why you shouldn't. I haven't had any problems. Occasionally someone cites that quote on the comp.lang.php newsgroup, but they never have any reasons to back it up. This is 3 machines, 5 websites between them, that see daily use of an extensive custom written CRM app that is all in PHP. MySQL is the database.
  • i've been using both (Score:4, Informative)

    by dcocos ( 128532 ) on Tuesday March 23, 2004 @12:43AM (#8641921)
    I've been using both 1.3.x and 2.x with Tomcat and I have yet to really notice a difference except that the config files for 2.x seem to be laid out in a more sane order though it took a while to adjust. (I can't speak to PHP usage as the only time I touch it is for running squirrelmail)
  • by afabbro ( 33948 ) on Tuesday March 23, 2004 @12:44AM (#8641925) Homepage
    ...mod_perl does ;) Seriously. I (like many others) love HTML::Mason. HTML::Mason doesn't work with mod_perl 1.9.x and masonhq isn't going to make it work with mod_perl 1.9.x because they don't want to invest the energy in a pre-production release. I can't blame them. Until mod_perl goes to 2.0, I'm not going to ;)
  • by magnum3065 ( 410727 ) on Tuesday March 23, 2004 @01:04AM (#8642022)
    ..."Bowen disagrees with the PHP documentation however, noting that actual users report that they are using PHP with Apache 2.0.x without problems."

    A while back on Windows I had some issues getting the PHP module to load in Apache 2.0 when I was trying to use the latest releases available for each. However, I believe it was in the beta days of PHP4 and I'm not a fan of PHP anyways, so that doesn't concern me.

    Now I use Apache 2.0 because that's what Subversion works with.
  • RedHat ES 3.0? (Score:2, Informative)

    by rawg ( 23000 )
    I'm using RackSpace and the only way I can get PHP 4.3 and Postgresql 7.4 is if I use RedHat ES 3.0. It uses Apache 2. The only other option is to use PHP 4.1 and Postgresql 7.1. Stupid RackSpace. I would have used FreeBSD except they don't support it as they do with RedCrap.
    • Re:RedHat ES 3.0? (Score:2, Flamebait)

      by Graelin ( 309958 )
      I'm using RackSpace and the only way I can get PHP 4.3 and Postgresql 7.4 is if I use RedHat ES 3.0.

      That's funny, we're using Rackspace and have a variety of 7.3, AS and ES servers. We can install whatever software we want on them. It's really not that hard.

      The only other option is to use PHP 4.1 and Postgresql 7.1. Stupid RackSpace.

      No, your other option is to install them yourself. That's why they give you root access to your servers. You really shouldn't blame Rackspace for your own shortcomings
      • Except the software is not supported by Rack Space. Sure I can install them...

        In fact, I had them switch me over to FreeBSD because basically I have to support myself anyway. So if I'm going to have to do my own support, I might as well do it on a OS that I like. Now I'm up and running and my server is about five times faster.

        As soon as our contract runs out, I'm bailing out of there. Their service has been awful and their prices are way out there.
  • inertia... (Score:2, Insightful)

    by borgdows ( 599861 )
    I still use 1.3.x because I've been using the Apache 1.x series 'forever' and I've never found a solid reason to change.

    I still use Windows/IE/Office because I've been using the Windows/IE/Office series 'forever' and I've never found a solid reason to change. :/
    • Look harder, or to be really blinded, open your eyes.

      * This post is aimed at a Funny mod, not a Troll/Flamebait, no matter how close to the truth the joke is.
  • This little cocktail seems to work flawless for monthes on my production server. I had a few strange problems on apache 1.3 when i changed my hardware (freezes) that pushed me to switch to Apache2 and i'm very happy of it atm.
    • The same combination has been a disaster for me.
      Under load, the box becomes unresponsive (not crashed, but the server is very long to answer).
      Tried FreeBSD-current with the same result.
      A Gentoo Linux box with the same hardware, same software installed from portage works flawlessly.
  • Modules! (Score:2, Interesting)

    Basically, the upgrade inertia is largely due to modules. For me here's the list of modules that are currently 1.3.x only: * ChiliASP/mod_casp. I don't know whether they have supported Apache2 now, but frankly I intend to get rid of it of mod_mono (which already supports Apache2). I truly hate this piece of crap! * mod_frontpage. Also haven't checked out lately. * a couple of C modules I wrote. I really hate C though, and I intend to rewrite these in Ruby/mod_ruby.
    • Re:Modules! (Score:2, Informative)

      by Raxxon ( 6291 )
      Just was tinkering with mod_frontpage and it's now basically Apache2 only. They still have support for 1.3x, but it's being phased out from what I can tell.

      And installing it under 2.0.49 wasn't too bad after I realized that it REQUIRES the 'bin' user. :p It runs as well as anything MS related can under linux... ;)
    • Ready-to-Run Software is pleased to announce the release of the FrontPage 2002 Server Extensions for UNIX Service Release 1.2. This release addresses issues with the change password functionality. There are new passw*.htm files and a revised mod_frontpage.c. This release also includes support for Apache 1.3.29 and Apache 2.0.48.
    • had a heck of a time & failed trying to get mod_ruby/eRuby working with apache2 under FreeBSD 5.x....maybe I'll give it another whirl with FreeBSD 5.21
  • Cool names (Score:4, Funny)

    by Hard_Code ( 49548 ) on Tuesday March 23, 2004 @04:40PM (#8648708)
    Ransom Love
    Havoc Pennington
    Sander Striker

    Geez, what books were your parents reading you to give you such cool names.

    I think I'll change my name to "Gusto McAction".
  • by gilesjuk ( 604902 ) <<giles.jones> <at> <zen.co.uk>> on Wednesday March 24, 2004 @07:04PM (#8661755)
    If everyone sticks to 1.x then 2.x won't get enough testing and bug reports. Of course you'd be silly to deploy 2.x if it's going to fall over miserably, but developers should have a box with 2.x installed for testing it and possibly assisting with bug reports.
  • they've been using 2.0 with php since Sept. 30th 2002 [redhat.com]. They're pretty smart guys, real nice to. I trust em, So I've been using PHP with Apache2, no problems yet...
  • Apache2 Apache1 (Score:3, Interesting)

    by man_ls ( 248470 ) on Friday March 26, 2004 @01:51AM (#8676965)
    I switched from using Apache 1.3.28 with PHP for my business (running on Windows) to using Apache 2.0.48.

    With *no other configuration changes*, web pages were rendered and sent out to the clients *literally 3-5 times faster* than they previously had been. A site that took 11 seconds to load and display on Apache 1 took 4 seconds with Apache 2.

    This was over a 100 mbit LAN connection; so the bottleneck was definately server-side, not client side.

    (the entire thing is reduced to 1 second now...btw)
    • by Anonymous Coward
      There is a reason that some of us calls Apache2 "the windows version".

      The biggest changes were that Apache2 can use threads instead of processes, because Windows is extremely slow when creating processes.

      This is also the reason that unix people are slow to upgrade, because there are not much advantage for us, since unix (maybe except Solaris) always were very fast at creating new processes.
      • Actually, Windows is the biggest beneficiary of the threaded code, but the IBM OS/400 group in Rochester was the originator of taking Apache in that direction. Creating processes on OS/400 is even more expensive than in Windows, and when they wrote the IBM HTTP Server Powered by Apache, based on the 1.3 codebase, they added threads to it.
  • There are some pretty "interesting" bugs, such as the one where if you have CGI that sends too much output to stdout, the apache child will hang as documented here:

    http://issues.apache.org/bugzilla/show_bug.cgi? i d= 22030

    And then there's the fact that Netscape LDAP connectors don't compile properly as a result of autoconfig screwups, as documented here:

    http://nagoya.apache.org/bugzilla/show_bug.cgi?i d= 19085

    And combine this with the fact that the latest comment from the FSF is... "Buy commercial suppor
  • by dananderson ( 1880 ) on Monday March 29, 2004 @04:05PM (#8706830) Homepage
    Apache 2 works for me with PHP. YMMV. The trick is to not use an external library that is thread-unsafe. I have instructions and troubleshooting information at http://dan.drydog.com/apache2php.html [drydog.com]

    For Redhat 9 and probably other distributions, Apache 2 and PHP are supported out of the box.

  • What is this 'Apache' and 'PHP' that you speak of? What is wrong with Telnet, IRC, and Shell? It is much more dynamic than using all these new technologies, and it runs well on my Tandy computer.

    - Anonymous Coward (Age: 89)
  • Why hasn't PHP been regression-tested against apache2?

    Is there no regression test defined for PHP?

    I find that hard to believe.

    Are there a boatload of bugs?

    That's a little more believable, but still an odd probability, given that there have been 49 revs of 2.0 so far...

    Are they being entirely too persnickety about the possibility of minor yet embarassing bugs?

    You tell me.
  • I noticed the PHP advice when I was installing it on my Apache 2.x home server. I wouldn't use Apache 2.0 in an enterprise environment (You don't want your boss on your back asking why the server is down?!) but I've found it's very stable for my home server stuff. The only problem I've found is that just after it was released there were regular security patches which I had to keep on top of.
  • I've been using Apache2 now for some time.

    I run several commercal sites... one is even a large shopping mall... which gets hammered.

    It really is about what is compiled in.
    It's the old rule, if it's not needed, don't compile it in, it also saves on memory usage and is one less thing that can break/be vulnerable. :)

The Tao is like a glob pattern: used but never used up. It is like the extern void: filled with infinite possibilities.

Working...