php-cli and php-cgi

ml at ml at
Mon Mar 13 11:40:00 UTC 2006

Jeremy Chadwick a écrit :
> Presently, PHP doesn't offer a way for software or scripts (i.e.
> GNU configure scripts) to determine which type is installed, as far
> as I know...

We're using the output of "php -v" and search for (cli) or (cgi) :
%php -v|grep '(cgi)'|wc -l
%php -v | grep '(cli)' | wc -l

Maybe it's also possible to use the output of "php -h" that present -q 
or -C options for cgi version only

More information about the freebsd-ports mailing list