Saturday, 7 September 2013

Apache2 throwing 500 error for php files. log shows Premature end of script headers

Apache2 throwing 500 error for php files. log shows Premature end of
script headers

I'm on a relatively fresh install of Ubuntu and this is the first time
I've used the local web server on it.
The problem I have is that when I try and access a php file I get a 500
error.
To try and solve it I've: - Renamed index.html to index.php in /var/www to
make sure it's not a virtualhost error (standard "it works" file) - given
0777 permissions to both /var/www and the index.php file - made www-data
the owner of the directory and the file - made www-data the group for the
directory and the file - checked the error log - trawled Google
The error log shows: [Sat Sep 07 13:18:56 2013] [notice] Apache/2.2.22
(Ubuntu) PHP/5.4.9-4ubuntu2.3 configured -- resuming normal operations
which I understand means the PHP is loading correctly
The only entry I do not understand is [Sat Sep 07 13:19:00 2013] [error]
[client 127.0.0.1] Premature end of script headers: index.php I've done
searches but most of the articles I've found are no help.
Is there anything else I can do to try to debug the error or does anybody
have any ideas as to why this error is happening?
Thanks in advance, John

No comments:

Post a Comment