I have compiled PHP 4.0 as a CGI binary as I don't want it as a server module.
Everything has compiled fine. The problem is when I try to view a test php script on my website. I get an Internal Server Error. The error log tells me that the error is "Premature end of script headers" Can anyone tell me why I get this?
The code I am using is:
#!/usr/bin/php
<head>
<title>Test</title>
</head>
<body>
<?php
echo("Welcome to PHP\n");
?>
</body>
Running the program from the command line gives me the output:
X-Powered-By: PHP/4.0.1pl2
Content-type: text/html
<head>
<title>Test</title>
</head>
<body>
Welcome to PHP
</body>
As you can see I get the Headers. Someone please help.