This has been sitting forgotten on the draft queue for a while. I’m not using this setup at the moment, but the information is still useful.

Over the weekend I spent some time weekend figuring out how to get Knowledge Tree on lighttpd with spawn-php and lighttpd. Quite apart from the memory saving with using lighttpd, with spawn-php and fcgi its much easier to build a sane suExec style config.

According to this ktDMS forum item to run ktdms under lighttpd you need to set cgi.fix_pathinfo=1 in php.ini. According to the lighttpd fastcgi docs this also should run with “broken-scriptfilename” => “enable” option in lighttpd.conf.

With the included script spawn-php from lighttpd, apart from setting the user/group and socket settings appropiately, I also added ‘-n’ (no fork) to EX.