Subject: CGI changes for the php4 and php5 packages
To: None <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 09/04/2005 19:51:53
I've been investigating setting up PHP for use by non-Apache web-servers.
The php4 and php5 packages build and install the PHP CLI and PHP CGI
binaries; however the CGI binary (installed into /usr/pkg/libexec/cgi-bin)
is built with --enable-force-cgi-redirect, which according to the PHP
documentation "relies on Apache to set the non-standard CGI environment

Also, since we install the PHP CGI binary inside the web tree of files,
we don't need to build it with --enable-discard-path according to this

Since there are already packages that build and install Apache-specific
versions of PHP (ap-php4 and ap-php5), I think we should change the
PHP packages to *not* configure with:


We should also build them with FastCGI support (--enable-fastcgi) to
facilitate setting up a usable PHP installation for use with non-Apache
web-servers.  This would also be usable by Apache if a webadmin chooses
to use FastCGI PHP instead of mod_php.



	-- Johnny Lam <>