> -----Original Message-----
> From: Dave Restall - System Administrator [mailto:[EMAIL PROTECTED]

> how long it will be before PHP/Apache 2 is considered stable 
> enough to be
> used in a production environment ?.

Below is how Rasmus answered this question back on 7/4/03.

Kirk

>>

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

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

Reply via email to