Look later in the config file for other "php" strings. I only saw the one online, but there's something else about directories or something later after the mime declaration.
Have you modded the fast-cgi options in your config to include the .foo extension as PHP?
Something like:
fastcgi.server = ( ".foo" => ("localhost" => ("bin" => "path/to/php -c /path/to/php.ini",
"socket" => "tmp/php.socket")))
Honestly, that's a shot in the dark. If that doesn't work (or screws it up more) just revert back, and ask on their forums. I honestly dont' know because I don't use LightTPD.