running lighttpd with FastCGI

Sander Holthaus - Orange XL info at
Wed Aug 3 09:32:36 GMT 2005

owner-freebsd-questions at wrote:
> I am attempting to run lighttpd with FastCGI. I understand I
> must first get FastCGI support into php4. Can anyone point me
> in the right direction? I have tried all types of switches while
> compiling php4. 
> I have been looking for any switches I can set by scanning
> through the Makefile of php4 in the ports.

PHP has a meta-port for cgi: www/php4-cgi. Use that to start. There are a
few options you have to define, in the Makefile of lang/php4, you will find:

.if ${PHP_SAPI} == "cgi"
OPTIONS=        REDIRECT "Enable force-cgi-redirect support" off \
                DISCARD "Enable discard-path support" off \
                FASTCGI "Enable fastcgi support" off \
                PATHINFO "Enable path-info-check support" on


.if ${PHP_SAPI} == "cgi"
.if defined(WITH_REDIRECT)
.if defined(WITH_DISCARD)
.if defined(WITH_FASTCGI)

You want WITH_REDIRECT, as well as WITH_DISCARD and WITH_FASTCGI. (Forgot
what to do with PATHINFO).

Kind Regards,
Sander Holthaus

More information about the freebsd-questions mailing list