I've been trying to work this out all afternoon but cannot. I've installed cgiwrap ok, configuration ok and it works with .pl just fine but php is another matter. I have configured php using the --enable-discard-path which was ok, I've added the #!/usr/local/bin/php line to the top of the php file im trying to run through cgiwrap but I am geting an error 500. The error log reports the following:

root    index.php    <NULL>    164.11.204.57    <NULL>    ok    Sun May 10 22:50:38 2009

[Sun May 10 22:50:38 2009] [error] [client 164.11.204.57] Premature end of script headers: cgiwrap

Any help you can provide would be greatly apprechiated

Thanks
Maritn