Well said Rasmus, I have also been wondering why PHP with Apache2 wasn't
considered a production enviroment, and if I should be heading that way but
after readinng your post I feel a lot better, I have always been very happy
with Apache1 and PHP if it aint broke then no need to fix I say.

Regards,

Joseph Blythe

-----Original Message-----
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Friday, 4 July 2003 4:18 PM
To: Ow Mun Heng
Cc: Mark Charette; [EMAIL PROTECTED]; Shena Delian O'Brien
Subject: RE: [PHP] Re: Red Hat 9, Apache 2, and PHP


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.

-Rasmus

On Fri, 4 Jul 2003, Ow Mun Heng wrote:

> Does anyone have any idea or could give me an idea why php & apache 2.0 is
> not 'good' together?
>
>
>
> Cheers,
> Mun Heng, Ow
> H/M Engineering
> Western Digital M'sia
> DID : 03-7870 5168
>
>
> -----Original Message-----
> From: Mark Charette [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 04, 2003 9:02 AM
> To: [EMAIL PROTECTED]; Shena Delian O'Brien
> Subject: Re: [PHP] Re: Red Hat 9, Apache 2, and PHP
>
>
> Apache 2.x.x IS a production quality server, just not with PHP. Works
great
> with Tomcat, mod_jk2, Struts, etc.
>
> ----- Original Message -----
> From: "Shena Delian O'Brien" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 03, 2003 8:04 PM
> Subject: Re: [PHP] Re: Red Hat 9, Apache 2, and PHP
>
>
> > Does anyone know why Red Hat would switch to Apache 2.x.x when it is
> > well known that 2.x.x is NOT a production version?
> >
> > Brad Pauly wrote:
> > > Just thought I would share my experience with RH9. I have been running
> > > Apache 1.3.27 and PHP 4.3.2 on RH9 for a couple weeks (since 4.3.2
came
> > > out anyway, and 4.3.1 prior to that) on a test server. All are
compiled
> > > from source. The only problem I have had was a bug with the version of
> > > mogrify that is bundled with RH9. That was fixed by 'upgrading' to an
> > > older version. Other than that it has been fine.
> > >
> > > Brad
> > >
> > >
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to