WinXP- PHP install: Premature end of script headers
| From: | George Broyles | Date: | Sat, 02 Oct 2004 21:29:01 +0000 |
| Subject: | WinXP- PHP install: Premature end of script headers | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24681@lists.php.net to get a copy of this message | ||
I have successfully installed Apache 2.0.51 on my Windows XP machine. I also
installed PHP 5.0.1 under c:\php and configured the php.ini as in the
instructions. I am now trying to execute a php page in my browser. I created
an index.php with the following content:
<html>
<head>
<title>PHP Test</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
PHP TEST PAGE
<? phpinfo(); ?>
</body>
</html>
If I rename the file to index.html, it renders correctly when going to
http://localhost/. But as index.php I get a 500 server error to the
browser,
and the following in the apache error log:
[Sat Oct 02 15:43:42 2004] [error] [client 127.0.0.1] Premature end of
script headers: php.exe
I believe that I must have something incorrect or missing in the apache
httpd.conf. I will copy all the php related entries that I have in there
here:
*****
<IfModule mod_dir.c>
DirectoryIndex index.html index.html.var
DirectoryIndex index.htm
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex default.html
DirectoryIndex default.htm
</IfModule>
ScriptAlias /php/ "/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php /php/php.exe
*****
I can include the entire httpd.conf, if anyone feels it's necessary.
I've searched for a long time for a solution to this problem, and I find
lots of people asking the same question. But I have yet to see an answer.
The closest to an answer I've seen, is that someone said they installed php
as an apache module and that took care of their problem, but I don't know
how to install php as a module either.
Any ideas out there??
George
georgeb@satx.rr.com