./configure --prefix=/usr/local/php5-fcgi --enable-fastcgi --enable-force-cgi-redirect --disable-cli --enable-memory-limit --with-layout=GNU --with-regex=php make sudo make install
The compile flags enable a fairly basic PHP setup, you may need to add more options for things like MySQL, etc. DO NOT ADD --with-apxs OR --with-apxs2 AS A COMPILE FLAG -- THESE ARE APACHE ONLY AND WILL PROBABLY BREAK UNDER LIGHTTPD!
Add the following to your lighttpd.conf file
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php5-fcgi.socket", "bin-path" => "/usr/local/php5-fcgi/bin/php" ) ) )
Restart lighttpd, now with PHP support