I just installed PHP with my IIS 5.1 on WinXP Pro. When I try to run some simple scripts (e.g. phpinfo() and phpmyadmin), there's no problem. However, when I try to run this code:
<?php
$xh = xslt_create();
$fp = fopen("test.xsl", "r");
$xsl = fread($fp, filesize("test.xsl"));
fclose($fp);
$fp = fopen("test.xml", "r");
$xml = fread($fp, filesize("test.xml"));
fclose($fp);
$result= xslt_process($xh, $xml, $xsl, NULL, $xsltArgs);
xslt_free($xh);
?>
with an appropriate test.xsl and test.xml (or any XML/XSL files, for that matter), I get a nice error from IIS:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
I have tried the same thing in Apache, and it gives me a 500 plus this in error.log:
Premature end of script headers: f:\php\php.exe
or some such thing. I've seen other people with this problem, but they couldn't run anything. For me, it just seems to be a problem with Sablotron. I'm running PHP 4.1.1, but I had exactly the same problem with 4.1.0, and haven't gone back any farther than that. I'm assuming this is a PHP/Sablotron problem as it's the same on two different servers (and the nature of the error is that something went wrong with php.exe). Has anybody ever seen this before? Any suggestions?
Thanks
Dave