Install and configure PHP5 and lighttpd on mac os x 10.4

I was having trouble getting PHP 5 fastcgi to work with lighttpd on my Mac OS X 10.4 laptop. The core of the problem is that the default port install of php5 on the mac does not include CGI support.

The command you are looking for is

sudo port install php5 +fastcgi

#use this command to see what options are available
port variants php5

I believe this is the Mac equivalent to ubuntu's command

sudo apt-get install php5-cgi

PHP 5 and LightTPD on Mac OS X