[: -le: argument expected

Chris H. chris# at 1command.com
Fri Feb 1 10:18:22 PST 2008

Hello Tom, and thank you for your reply.

Quoting Tom Evans <tevans.uk at googlemail.com>:

> 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

I greatly appreciate your /very/ informative reply. All points well

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

Well, I decided that perhaps something might have been added that to ports
since my last cvsup. Hoping that any addition might cure my current delemna.
I wanted to sync up my ports database before hand. So ran a portsdb -uU.
This - interestingly enough, resulted in both [: -le: argument expected,
and [: -eq: argument expected being emitted /many/ times during the portsdb
process. So, now I'm stumped. It is clear that it is /not/ specific to the
php5-apache-module. But rather, something that is common to that, and other
ports. It's clear that /bin/[ is the command complaining. But my guess is
that something else is triggering it - perl perhaps? Don't know, and ATM
don't know how to find out, or what to try next. :(

Thank you again for taking the time to provide such an informative response.

make extract emits the following:

[: -le: argument expected
[: -le: argument expected
===>  Cleaning for php5-5.2.5_1
[: -le: argument expected

make emits the above, as well as the following:

configure.in:152: warning: AC_PROG_LEX invoked multiple times
../../lib/autoconf/programs.m4:779: AC_DECL_YYTEXT is expanded from...
aclocal.m4:2080: PHP_PROG_LEX is expanded from...
configure.in:152: the top level

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating main/php_config.h
config.status: executing default commands
===>  Building for php5-5.2.5_1
"Makefile", line 592: warning: duplicate script for target 
"main/internal_functions.lo" ignored

-I/usr/ports/lang/php5/work/php-5.2.5/Zend    -O2 -fno-strict-aliasing 
-pipe  -prefer-non-pic -c 
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c -o 
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c: In 
function 'apache_php_module_main':
error: 'NOT_FOUND' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: for each function it appears in.)
*** Error code 1

Stop in /usr/ports/lang/php5/work/php-5.2.5.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Thanks again.

--Chris H

> Cheers
> Tom
> [1] http://httpd.apache.org/docs/2.0/mod/
> [2] http://uk.php.net/manual/en/install.unix.apache2.php

panic: kernel trap (ignored)

More information about the freebsd-apache mailing list