Internal Server Error


#1

I hope this is the right place for this…

After my traffic started increasing, ‘Internal Server Error’ messages started randomly showing up now and then.

What should I do?

full error:

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@boredonthebook.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

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."


#2

I can’t be sure what’s going on but there seems to be something wrong with your index page that it’s trying to display. A little looking showed this link worked and redirected to facebook: http://boredonthebook.com/index.php

Wholly


#3

not sure whether this will help

http://wiki.dreamhost.com/index.php/Installing_PHP5#Comments

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#4

I don’t think he had his own copy of php.

Wholly


#5

Sometimes these errors can be very hard to track down, particularly if they are “random” (the script works most of the time, and only fails now and then).

The first place I’d recommend you start checking for clues is your error log. These can be found at /home/user/logs/domainname. Looking through these files for entries that match the time you encountered the error will help determine what happened, as the error message indicated. That’s where you start. :wink:

–rlparker


#6

ah ha… ok after looking through the scripts…

and then causing the error and looking again, after the error happens these two lines show up:
[Mon Jan 15 08:11:31 2007] [error] [client 65.121.61.37] Premature end of script headers: php5.cgi, referer: http://www.boredonthebook.com/index.php?display=friendmatrix&mode=startload
[Mon Jan 15 08:11:31 2007] [error] [client 65.121.61.37] File does not exist: /home/ozzie/boredonthebook.com/internal_error.html, referer: http://www.boredonthebook.com/index.php?display=friendmatrix&mode=startload

The first of the two is the real error…
‘Premature end of script headers’

Here’s the problem…
I have a lot of different sites all running different code and getting the same error.

I’m thinking I’m getting “Premature end of script headers” some how due to increased traffic… is there a way to fix that?


#7

I don’t know…though I don’t believe that the “premature end of script headers” would be generated by the amount of traffic. It seems more likely to me that one of the files is “borked” in someway - an extraneous extra linefeed somewhwere, or somehow messed up by not having been uploaded in ASCII mode, etc. This is relatively common with PHP scripts moved between machines via FTP.

–rlparker


#8

I’m getting the same error. But error.log show me this:
[Mon Jan 15 13:28:02 2007] [error] [client 200.232.155.2] Premature end of script headers: php.cgi

Help me! =]


#9

i have the same problem here !

http://deviloid.6pix.net

when i upload a picture with a size over 1MB i have randomly this error:
500 internal server error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@deviloid.6pix.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

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.

i checked my error.log and i have :

Premature end of script headers: php.cgi, referer: http://deviloid.6pix.net/
File does not exist: /home/tyan/deviloid.6pix.net/internal_error.html, referer: http://deviloid.6pix.net/

please help !


#10

I’m having the same kind of problem on a number of sites running both php5 and php4.

I get either Premature end of script headers: php5.cgi, referer: or Premature end of script headers: php.cgi, referer: depending on the site.

the problem is intermittent and increasing in frequency.

I am on server dumdum. what server are you on?


#11

i’m on the “marge” server


#12

my script here : http://deviloid.6pix.net is an image hosting script that allow upload of pictures up to 1.5MB.

when i upload a 1.1MB picture (the same picture) 6 times, i have this ERROR once or twice. Then what can cause this problem ? my script was working very well until a few days.


#13

i made a search in the wiki about the “premature end of script” and everything i find is about chmodind to 755 all the scripts. i made it but still have this error. BTW i don’t use any cgi script on deviloid.6pix.net
i don’t have any php.cgi on this site.

I really need someone to give a look on my account ! i contacted the support 15Hours ago and no news !


#14

ok i think i’ve found what was the problem.

in SSH i ran the TOP command and i saw 6 php.cgi process runing ??!

i just killed the process with the "kill " command.

I tested to upload a file again and it’s working like before, if i don’t post here anymore then that was my problem and it’s solved.


#15

Thanks for following up with that. Let us know if you get any meaningful info from support - you may even want to add what you found to your support request.

Wholly


#16

the support team checked my account when i already solved my problem, then they didn’t found anything wrong.

Then my problem was solved by killing all “php.cgi” process. if you have this kind of problem on your site just check if you don’t have any “php.cgi” running with a TOP command in the shell. if you find 1 or more running without disappearing from the list then it could be your problem. Kill the process with a “KILL <#pid>”.