[ILUG] Apache 2 and PHP

Niall O Broin niall at linux.ie
Sun Mar 14 01:01:12 GMT 2004


I've had a test install of apache2 for a while, and I have noted that
the heanet people are quite happy with it. However, I haven't tried
using PHP with it - some people said it was fine, others that it still
had issues. The fact that I couldn't find a PHP module for Apache 2 on
Debian unstable led me to think that the latter view may be more
correct.

A little googling during the past week (when hard disks stopped dying
for a few minutes) led me to some very recent statements by Rasmus which
seem to indicate that the threaded model of Apache 2 and PHP definitely
have issues. It seems that there's severe reservation expressed as to
whether this may EVER be solved, due to the general difficulty of saying
that a particular piece of code is thread safe. And as most PHP
installations rely on many different modules, it becomes increasingly
unlikely to say that a particular body of code is thread safe.

Add to this the fact that non thread safe problems are among the hardest
to debug, because their appearance can be so elusive, depending on load,
moon phases, and oestrogen cycles, and at best, we have a problem.

So given that, what are the options? Forget about Apache 2 with PHP at
all pro tem? Or build Apache with a non threaded model? In such a case,
what are the advantages of Apache 2 over Apache 1.3? I know it's a nice
shiny new clean code base, but that in itself may be a bad thing for a
while. Is non threaded Apache 2 any faster than 1.3, for a given Linux
on given hardware?


Niall



More information about the ILUG mailing list