Page 1 of 1

apache Error 500 (Premature end of script headers)

Posted: Fri Jun 24, 2005 9:02 am
by newmember
Hi

when i'm accessing my site via http://nila.lunarpages.com/~myname/ i'm getting:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
...
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

--------------------------------------------------------------------------------

Apache/1.3.33 Server at nila.lunarpages.com Port 80
also in error log i see:
Premature end of script headers: /home/myname/public_html/index.php
i searched web about this error and found that this error can arise from limited file permissions, incorrect ftp upload mode , newlines conventions or not using content type header.

i verified all these things: files are saved with unix newline style,
upload mode also was correct(filezilla) and finally i set up 755 owner permissions and correct content-type.

now, regarding the content of index.php, i tried something like:

Code: Select all

<?php
header("Content-type: text/html");
phpinfo();
?>
and

Code: Select all

<?php
echo('ok');
?>
or simply:

Code: Select all

some text here
no matter what i'm getting the same 500 error and the same error message in log.

What else can i do?

Re: apache Error 500 (Premature end of script headers)

Posted: Fri Jun 24, 2005 9:14 am
by Chris Corbyn
newmember wrote:What else can i do?
Does plain HTML load OK or is it just when PHP is being used?

I think we need to identify if this is Apache or PHP that's having the problem...

Also, try your files in another directory on the same server and see how they load then ;)

Posted: Fri Jun 24, 2005 9:22 am
by newmember
i tried now:
<html>
<head>
<title>Welcome</title>
</head>
<body>
</body>
</html>
and i tried to put another index.php in different directory

still nothing changes.. i get the same "server internal error" page
:?

Posted: Fri Jun 24, 2005 9:27 am
by Chris Corbyn
newmember wrote:i tried now:
<html>
<head>
<title>Welcome</title>
</head>
<body>
</body>
</html>
and i tried to put another index.php in different directory

still nothing changes.. i get the same "server internal error" page
:?
Was this is .html extension or a .php extension... I want to know what happens when the page is not parsed by PHP at all.
It sounds from what you are telling me however that the apache installation needs setting back up from scratch but try with a plain .html extension first please.

Posted: Fri Jun 24, 2005 9:33 am
by newmember
ok, i tried the same index.html and it worked... no errors...

so what that all means?

Re: apache Error 500 (Premature end of script headers)

Posted: Fri Jun 24, 2005 9:36 am
by dethron
d11wtq wrote:I think we need to identify if this is Apache or PHP that's having the problem...

It means d11wtq identified the problem :))

Posted: Fri Jun 24, 2005 9:40 am
by newmember
so you think i should write an email to tech support?

Posted: Fri Jun 24, 2005 9:52 am
by dethron
1) When did this problem happen first?
2) Before that, had you used a .php file?
3) Is it a dedicated server or what?

Posted: Fri Jun 24, 2005 9:58 am
by newmember
this site is hosted by lunarpages.com.
i'm did all the major work on my home machine and just today i decided to upload the almost finished work for final touches.
... and the error appeared from the beggining.

Posted: Fri Jun 24, 2005 10:06 am
by dethron
newmember wrote:so you think i should write an email to tech support?
email to the tech support :(

Posted: Fri Jun 24, 2005 11:09 am
by newmember
i already got a reply from them(fast) :D
Unfortunately, the temporary url will not work with the suPHP servers we use at Lunarpages. You will either need to wait until the domain name has propagated or request a temporary subdomain off of lunarpages (in the form subdomain.lunarpages.biz or .info) for php pages to function.
...and i "wasted" a few hours on trying figuring out what could the problem... :P

Posted: Fri Jun 24, 2005 11:14 am
by dethron
Qui-Gon Jinn: Patience, my blue friend.