Subject: Re: Threaded Apache and PHP
To: John Klos <>
From: Todd Vierling <>
List: tech-pkg
Date: 10/07/2005 16:48:39
On Fri, 7 Oct 2005, John Klos wrote:

> I know this isn't particularly NetBSD related, but it seems that mod_php (4)
> won't load under Apache 2 compiled for workers as opposed to preforking.
> 1) Is this how it's supposed to be?

Yes.  PHP + threads typically = disaster.  There is locking in PHP4, but the
PHPmanual pretty clearly states "don't do that".  8-)

> 2) If it is, then what's the recommended way to run php as an external
> interpreter?

I've been able to do it via the instructions I posted last week, and the
help of ap-fastcgi:

It currently involves hacking pkgsrc/www/php4/Makefile, because the changes
involved were still under debate last I checked.  I am planning to make it a
PKG_OPTION for php4.

Also, make sure your installed devel/apr is at least (nb1 is
not new enough) if you want a threaded apache on NetBSD.  That adds fix to
signal handling that caused apache to fill up its subprocess table with CGI
zombie processes.

-- Todd Vierling <> <> <>