[: -le: argument expected

Tom Evans tevans.uk at googlemail.com
Fri Feb 1 09:01:30 PST 2008


On Fri, 2008-02-01 at 07:42 -0800, Chris H. wrote:
> Hello Tom, and thank you for your thoughtful reply.
> 
> I would have to assert that in my case, your assertions are also a bit
> moot. Would make deinstall apache2.0 && make install apache2.2 &&
> make install php5 -DWITH_CGI=TRUE -DWITH_CLI=true -DWITH_APACHE=true
> accomplish a successful build? In fact, no. As the real problem at
> hand, is getting php5 to build the apache module (libphp5.so). :)
> 
> On the other hand. Assuming a successfully built apache module;
> How large is the difference between the same modules in
> 1.2 vs 2.0 vs 2.2?
> How large is the difference in apache' reaction to calls made to
> apache, where these modules are involved?
> Does Apache 2.2 offer the -DWITH_MPM=threadpool? I couldn't find it.
> 
> Thank you for your informative, and thoughtful reply.
> 
> --Chris H

HTH. I'm afraid I can't help too much with PHP, as I don't myself use
PHP anywhere. I know other guys in the office do have PHP 5 working
nicely with apache22 from ports though - I'd assume that the problem is
with a system library, I may have missed the email with the actual error
logs in it.
When using PHP, it is important to use the prefork MPM. The other MPMs
are all threaded, and not very many PHP extensions are thread safe. I'm
not sure what the 'threadpool' MPM is - in 2.2 there is prefork, worker
(which implements itself through a multi-process multi-thread model),
and event, which is a specialized version of worker that uses a single
dedicated thread to handle listening sockets and keep-alive sockets.

We use the event MPM on our front end proxies (also marked as
'experimental', but this is (according to the dev I asked) as it doesn't
support accept filters (and hence cannot handle SSL). 
Our proxies handle a large amount of web traffic, serving static files
locally and reverse proxying dynamic requests to the appropriate backend
webservers, running anything from custom 1.3 apache modules, PHP 5
served from prefork MPM apache 2.2 servers, and, in one unfortunate
incidence, hand-rolled web servers. 
The event model works incredibly well at this task, with load averages
never peeking above 0.05.

I just checked the 2.0 modules page [1], and there is a 'threadpool' MPM
there, listed as 'This MPM is a developer playground and highly
experimental'! I think that even if you do get PHP5 to build with that,
you will be disappointed as soon as you get some significant load, and
will have a hell of a time debugging it. 

prefork MPM isn't sexy, but it does work with PHP. From [2]:
  We do not recommend using a threaded MPM in production with Apache2.
  Use the prefork MPM instead, or use Apache1. For information on why,
  read the related FAQ entry on using Apache2 with a threaded MPM

If you have some error messages (or pointers to the emails I missed!)
I'll take a looksie at them.

Cheers

Tom


[1] http://httpd.apache.org/docs/2.0/mod/
[2] http://uk.php.net/manual/en/install.unix.apache2.php
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080201/81cba70e/attachment.pgp


More information about the freebsd-ports mailing list