[nycphp-talk] What breaks in 4.3?

Hans Zaunere zaunere at
Thu Feb 6 13:40:06 EST 2003

--- Ophir Prusak <ophir at> wrote:
> I was thinking of installing apache2.0 + php on a heavily loaded machine
> because of apache 2.0's multi-threaded option.
> Specifically, it's running out of memory.

You may end up with memory corruption if you go threads (and if you're on
FreeBSD 4.x you'll be lucky to get Apache stable for more than a few hours).

> The info at specifically says ONLY to
> use the prefork MPM with PHP.
> Anyone know where I can find more info on this ?

There's an excellent thread continuing on Apache-Dev in regards to these
types of issues with PHP/Apache2 and other interesting topics on the
workings, design and direction of Apache in general.

>  Multi-Processing Module (MPM)
> This handles multiple web server requests. Apache 2 has various MPM
> flavors, including multi-threading. For now, on Linux (and even UNIX), only
> use the (default) prefork module.

For "stability," maybe, but I think some would argue that the worker MPM
(threaded) is fine with the right thread lib and extensions, if any.

> This is done at compile time. Other MPM modules break PHP and other
> modules.

The issue isn't really PHP itself, but extensions that get compiled in.  I've
been running Apache 2/MySQL 4.x/PHP 4.2.x and just recently 4.3.0 in
production without issue.  But granted, all it does is use MySQL and Oracle
extensions, both of which are highly thread aware.

> Also Linux 2.4 doesn't handle threads efficiently (wait until
> Linux 2.6).

True, although MySQL, for example, runs fine on Linux (in fact its the best
platform for it, IMO and 2.6 should offer much
improvement.  FreeBSD 4.x is what you should stay away from (although
addressed in 5.x) for threading (but again, I run MySQL happily on FreeBSD,

In all, I don't you'd gain much from Apache2/PHP in the threading model
without considerable work and/or carefuly picking your extensions.  Although
it'd be interesting to really spend some time on, especially in a heavily
loaded environment.

Hans Zaunere
President, New York PHP
hans at

More information about the talk mailing list