Subject: Re: CGI changes for the php4 and php5 packages
To: Jaromir Dolecek <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 09/09/2005 15:11:46
Jaromir Dolecek wrote:
> According to:
> it appears such setup would not work, PATH_INFO and PATH_TRANSLATED
> would contain incorrect info.

 From the sapi/cgi/README.FastCGI file included with the PHP sources:

     You must add '--enable-fastcgi' to the configure command on Linux or
     OSX based systems to get fastcgi support in the php-cgi binary.  You
     also must not use '--enable-discard-path'.

My original goal was simply to provide a FastCGI-capable PHP 
installation by default.  I had suggested getting rid of 
--enable-discard-path for only this reason, but I freely admit that I 
didn't understand the ramifications of this.

Since it's clear that there are some trade-offs that have to be made 
depending on whether you decide to run PHP as a CGI or with FastCGI (in 
particular, the --enable-discard-path option), perhaps we could provide 
php-fastcgi packages instead?  I would normally just use a PKG_OPTION 
for something like this, but I think that having the bulk builds 
automatically build and provide binary packages for a PHP package that 
does FastCGI is desirable enough to warrant a separate package.

My new plan is to create a php-fastcgi package that only installs:


The php-fastcgi package would be configured *with* 
--enable-force-cgi-redirect but *without* --enable-discard-path.
This package would depend on the corresponding php package to get all 
the standard modules and PEAR installation.  Does this sound workable to 


	-- Johnny Lam <>