I think this stability issue is really a Apache2/PHP issue. After playing
with Apache2 for the last year, I found that pretty incredible but true. I've
found numerous posts about this on the web. Basically at this point PHP.net does
not support Apache2 (mostly because of the extensions that have to be re-written to be
thread safe).
You can see the warning from PHP.net for both Unix and Windows versions of
Apache 2.
In fact they say that stack is more stable on Windows, see below (but still not
100%):
53.1.
Why shouldn't I use
Apache2 with a threaded MPM in a production environment?
PHP is glue. It is the
glue used to build cool web applications by sticking
dozens of 3rd-party libraries together and making it all
appear as one coherent entity through an intuitive and
easy to learn language interface. The flexibility and
power of PHP relies on the stability and robustness of
the underlying platform. It needs a working OS, a
working web server and working 3rd-party libraries to
glue together. When any of these stop working PHP needs
ways to identify the problems and fix them quickly. When
you make the underlying framework more complex by not
having completely separate execution threads, completely
separate memory segments and a strong sandbox for each
request to play in, feet of clay are introduced into
PHP's system.
If you feel you have to use a threaded MPM, look at a
FastCGI configuration where PHP is running in its own
memory space.
And finally, this warning against using a threaded
MPM is not as strong for Windows systems because most
libraries on that platform tend to be threadsafe.
Using FastCGI is kind of like running with Apache1 (each PHP request has its
own "space" separate for the next php request). To make up for the loss in speed
(CGI is a lot slower then the module version of PHP) use eAccelerator.
2) Run with Apache1
3) Run with IIS
I might have been lucky but I've been running some PHP4 sites with IIS5 for
years without any major issue. I got into Apache2 on Windows mostly for the
Clean URLs and for the fun of it...
Joined: 2006-01-02
Hi,
I think this stability issue is really a Apache2/PHP issue. After playing with Apache2 for the last year, I found that pretty incredible but true. I've found numerous posts about this on the web. Basically at this point PHP.net does not support Apache2 (mostly because of the extensions that have to be re-written to be thread safe).
You can see the warning from PHP.net for both Unix and Windows versions of Apache 2.
http://www.php.net/manual/en/install.unix.apache2.php
http://www.php.net/manual/en/install.windows.apache2.php
In fact they say that stack is more stable on Windows, see below (but still not 100%):
If you feel you have to use a threaded MPM, look at a FastCGI configuration where PHP is running in its own memory space.
And finally, this warning against using a threaded MPM is not as strong for Windows systems because most libraries on that platform tend to be threadsafe.
My recommendations would be:
1) Run PHP with FastCGI:
See: http://www.sitebuddy.com/php/php_apache_fast_cgi_install
Using FastCGI is kind of like running with Apache1 (each PHP request has its own "space" separate for the next php request). To make up for the loss in speed (CGI is a lot slower then the module version of PHP) use eAccelerator.
2) Run with Apache1
3) Run with IIS
I might have been lucky but I've been running some PHP4 sites with IIS5 for years without any major issue. I got into Apache2 on Windows mostly for the Clean URLs and for the fun of it...