Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 03-28-2007, 07:39 AM
GatorAndre
HostGator Guest
 
Posts: n/a
Arrow Internal Server Error (Error 500) Mini Troubleshooting Guide

Hello,

The first thing you should do whenever you get an Internal Server Error is to check the Error Log in your control panel, as this will provide good information for you/us to resolve the problem. (cPanel » Error Log)

Common Errors and Solutions:

Quote:
Premature End of Script Headers
CGI/Perl Script missing the Context-Type variable. You should add it to your script.

Example:
[edit /zeadie] - Try adding the -w flag to it too
Code:
#!/usr/bin/perl -w
print "Content-type: text/plain\n\n";
print "testing...\n";
-------------------------------------------------------
Quote:
Invalid command ‘php_flag’, perhaps mis-spelled or defined by a module not included in the server configuration
Your .htaccess file is trying to set php rules which isn't allowed. You'll have to move those rules to a new php.ini file (should be placed on /public_html).


Example - register_globals


On .htaccess:

[edit/jshanley]: Do not use php_value on our shared servers, they are suPHP.
Instead, set the values in your php.ini file. Thanks.

Code:
php_value register_globals on

On php.ini:
Code:
register_globals=On
-------------------------------------------------------
Quote:
Directory is writeable by others /home/username/public_html/folder
You would need to change the permissions (chmod) of /public_html/folder to 755 on this case.

Last edited by GatorZach; 05-20-2008 at 04:51 PM.
Reply With Quote
  #2  
Old 03-28-2007, 02:24 PM
PsiPro PsiPro is offline
King Croc
 
Join Date: Nov 2005
Posts: 812
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

*cough*
Sticky?
*cough*
Reply With Quote
  #3  
Old 03-28-2007, 05:15 PM
GatorAndre
HostGator Guest
 
Posts: n/a
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by PsiPro View Post
*cough*
Sticky?
*cough*
Will do, .
Reply With Quote
  #4  
Old 03-28-2007, 05:25 PM
James V James V is offline
Hatchling Croc
 
Join Date: Mar 2007
Posts: 4
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Premature End of Script Headers
I'm getting this error today. I'm not running a cgi script - I think it has something to do with permissions and suEXEC. It works fine on my local server. How can I check the suexec logs?

Thanks for the help.

Last edited by James V; 03-28-2007 at 06:05 PM.
Reply With Quote
  #5  
Old 03-29-2007, 03:48 AM
GatorAndre
HostGator Guest
 
Posts: n/a
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by James V View Post
I'm getting this error today. I'm not running a cgi script - I think it has something to do with permissions and suEXEC. It works fine on my local server. How can I check the suexec logs?

Thanks for the help.
Which version of php are you using?
Reply With Quote
  #6  
Old 03-31-2007, 02:49 PM
James V James V is offline
Hatchling Croc
 
Join Date: Mar 2007
Posts: 4
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

I don't think there is any php involved. The problem only occurs when the wysiwyg editor I'm using tries to open a popup window via javascript. I did some research, and figure it has to do with suexec. But I can't examine the suexec error logs to find out.
Reply With Quote
  #7  
Old 04-24-2007, 03:43 AM
sheyh sheyh is offline
Hatchling Croc
 
Join Date: Sep 2006
Posts: 1
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

They told me that my account (Baby) had 25 processing limit and when my account has 25 process I had a "internal server error".

If I have a site with 10.000 unique visitors per day, It's inescapeable to get this god damn error.

I am getting this error at least 5 times a day.
Reply With Quote
  #8  
Old 04-24-2007, 06:22 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by sheyh View Post
They told me that my account (Baby) had 25 processing limit and when my account has 25 process I had a "internal server error".

If I have a site with 10.000 unique visitors per day, It's inescapeable to get this god damn error.
If you are getting 25 connection limit errors with 10 visitors per day, your setup is incorrect. It should be impossible for you to hit the connection limit even if all 10 were on at the same time.

Look at your setup, specifically at mysql usage and try to determine why you are using so many connections.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #9  
Old 04-24-2007, 11:05 AM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Don't forget the use of "." the same way Americans use the comma. I assumed he was talking about 10,000 visitors a day-- am i right sheyh?
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #10  
Old 04-24-2007, 03:26 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by slapshotw View Post
Don't forget the use of "." the same way Americans use the comma. I assumed he was talking about 10,000 visitors a day-- am i right sheyh?

That is possible, or he was being very accurate about those 10.000 visitors!

10K visitors, it is possible that the 25 connection limit is a problem. Any more than 7000 and I would suspect that if the site isn't setup well, there may be problems. Normally tweaking would fix the problems...
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #11  
Old 05-08-2007, 03:32 AM
James V James V is offline
Hatchling Croc
 
Join Date: Mar 2007
Posts: 4
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

I'm using php version 4.3.6 at home, 4.4.4 on my host gator account. I still haven't got this resolved. When the text editor I'm using (areaedit) tries to open a popup window I get an Internal Server Error - Premature End of Script Headers. What could the problem be?
Reply With Quote
  #12  
Old 05-10-2007, 10:25 PM
raidermt raidermt is offline
Hatchling Croc
 
Join Date: May 2007
Posts: 20
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

I have a pretty basic site setup with SiteStudio, and with vBulletin installed and linked via an "external link" page. I haven't installed any plugins, skins or anything else on vBulletin and I haven't touched the code. I haven't even changed out the logo.

I and some users have been getting sporadic internal server errors.

The error log shows lots of "File does not exist" errors. The path is always in the public_html file and the files are:

favicon.ico
spacer.png

The favicon seems to only occur by itself.

The spacer occurs by itself sometimes, and sometimes at the same time as the following:

Premature end of script headers: ..../publichtml/vBulletin/upload/index.php

When this Premature error shows, there's also always a "File does not exist" that ends in 500.shtml.

Any suggestions? I'm not a coder, and while I see the suggestion at the top for "Premature" errors, I'm afraid I need it spelled out a little more.

Thanks,

Matt
__________________
http://july171955.com
Reply With Quote
  #13  
Old 05-10-2007, 11:29 PM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by raidermt View Post
I have a pretty basic site setup with SiteStudio, and with vBulletin installed and linked via an "external link" page. I haven't installed any plugins, skins or anything else on vBulletin and I haven't touched the code. I haven't even changed out the logo.

I and some users have been getting sporadic internal server errors.

The error log shows lots of "File does not exist" errors. The path is always in the public_html file and the files are:

favicon.ico
spacer.png

The favicon seems to only occur by itself.

The spacer occurs by itself sometimes, and sometimes at the same time as the following:
The favicon is a small picture asked by browsers for to be set at the beginning of the address bar and in bookmarks. You can take one from the web and put them in the domain root (Just under public_html). Google image for .icon. they are also some free tools for to make them from a jpeg or from the scratch.
The spacer error is probably genarated by an erroneous src. reading the full error line you will see wich line/script is bogus.
Check also that this spacer.png exist. In case just copy it where the bogus script is looking if you are unsure for to edit the script.
Quote:
Premature end of script headers: ..../publichtml/vBulletin/upload/index.php

When this Premature error shows, there's also always a "File does not exist" that ends in 500.shtml.
See http://forums.hostgator.com/showthre...ight=Premature
and http://forums.hostgator.com/showthre...ight=Premature
and others with a search premature
Reply With Quote
  #14  
Old 05-11-2007, 04:34 PM
raidermt raidermt is offline
Hatchling Croc
 
Join Date: May 2007
Posts: 20
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Thank you!

I was able to eliminate two of the three issues. There was a "clear" gif file in another folder and I copied it and put it in this folder and the error went away.

I also converted a gif to an icon and put it in the folder and that went away.

I also, per instructions from vBulletin, re-uploaded all the non-image files (except install) for vBulletin. I then went about 12 hours without a premature error, but it happened to two users this afternoon, myself and another.

So I'm still trying to figure that one out, so any further help would be appreciated. I've looked at some of the premature threads here, but most still leave me confused due to my lack of coding skill and experience.

But I'm ready to learn, so if anyone has any further suggestions, I'm all ears.
__________________
http://july171955.com
Reply With Quote
  #15  
Old 09-29-2007, 02:42 AM
pmusu pmusu is offline
Hatchling Croc
 
Join Date: Feb 2007
Location: Malta
Posts: 7
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

The errors I have been getting for the past 2 days are the following: (upgraded to Wordpress 2.3 so not sure if it is related).

Premature end of script headers: public_html/wp-cron.php

Premature end of script headers: public_html/index.php
__________________
http://www.kaizenlog.com
Reply With Quote
  #16  
Old 12-16-2007, 06:43 PM
parttime parttime is offline
Hatchling Croc
 
Join Date: Oct 2007
Posts: 4
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

I had the same error and all it took to fix was -open directory in file manager in c panel change (cmod) all files with 777 permissions to 755.
__________________
Webmasters earn revenue with every visitor to your site! Affiliates earn up to 30% http://www.ppp-audio.newcbproducts.com
Reply With Quote
  #17  
Old 05-20-2008, 04:26 PM
cmomo0128 cmomo0128 is offline
Hatchling Croc
 
Join Date: May 2008
Posts: 10
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

I'm trying to put a simple php form handler on my site and I am having problems getting it to work. Ive got a few different scripts that I have tried, & I dont think it is a script issue. The first post in this site says to put this code in the .htaccess file: php_value register_globals on. I tried that,but I must have not done something wrong, because then the whole site was down. I guess my question is, what is the exact code that needs to be put in the .htaccess file?
Reply With Quote
  #18  
Old 05-20-2008, 04:38 PM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by cmomo0128 View Post
I'm trying to put a simple php form handler on my site and I am having problems getting it to work. Ive got a few different scripts that I have tried, & I dont think it is a script issue. The first post in this site says to put this code in the .htaccess file: php_value register_globals on. I tried that,but I must have not done something wrong, because then the whole site was down. I guess my question is, what is the exact code that needs to be put in the .htaccess file?
You cannot put your line in .htaccess, you have to put it in php.ini :
Quote:
Originally Posted by GatorAndre View Post

On php.ini:
Code:
register_globals=On
Even if this line is not a very secure way to do anything...
Reply With Quote
  #19  
Old 05-20-2008, 04:42 PM
GatorJess's Avatar
GatorJess GatorJess is offline
HostGator Staff
 
Join Date: Sep 2006
Posts: 112
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Yes, please note:

With the change to phpSuExec, php_ rewrites are no longer usable in the .htaccess files. These codes must be modified for use in a php.ini file. Also, php.ini files are NOT RECURSIVE, so you must put one in each folder that needs the update/change, unlike .htaccess files.

If you have any questions, please don't hesitate to drop by LiveChat for assistance. We're happy to help!

Jess J.
Hostgator LiveChat
Reply With Quote
  #20  
Old 05-20-2008, 04:47 PM
cmomo0128 cmomo0128 is offline
Hatchling Croc
 
Join Date: May 2008
Posts: 10
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

I spoke to phone support and he put the php.ini file in the public_html folder, but it looks like a one size fits all so to speak php.ini. Do I just paste the code anywhere in there or what. By the way, I am pretty green at this web design stuff, I'm still trying to learn. Please forgive my ignorance.
Reply With Quote
  #21  
Old 05-20-2008, 05:15 PM
cmomo0128 cmomo0128 is offline
Hatchling Croc
 
Join Date: May 2008
Posts: 10
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

ok now i'm past that and getting this.
Premature end of script headers: (my domain )
SoftException in Application.cpp:544: Directory "-----------" is writeable by group.

I am moving forward, just don't know how fast.
Reply With Quote
  #22  
Old 05-20-2008, 05:16 PM
Sam Sam is offline
Emperor Croc
 
Join Date: Jan 2007
Location: /bin/false
Posts: 3,057
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by cmomo0128 View Post
ok now i'm past that and getting this.
Premature end of script headers: (my domain )
SoftException in Application.cpp:544: Directory "-----------" is writeable by group.

I am moving forward, just don't know how fast.
Chmod the directory to 755
Reply With Quote
  #23  
Old 05-20-2008, 05:21 PM
cmomo0128 cmomo0128 is offline
Hatchling Croc
 
Join Date: May 2008
Posts: 10
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Ok. What does that mean and where is it located?
Reply With Quote
  #24  
Old 05-20-2008, 05:23 PM
Sam Sam is offline
Emperor Croc
 
Join Date: Jan 2007
Location: /bin/false
Posts: 3,057
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Quote:
Originally Posted by cmomo0128 View Post
Ok. What does that mean and where is it located?
In your FTP client, if you right click on the folder that is giving the error, there should be an option to CHMOD the folder.
Reply With Quote
  #25  
Old 05-20-2008, 05:27 PM
cmomo0128 cmomo0128 is offline
Hatchling Croc
 
Join Date: May 2008
Posts: 10
Default Re: Internal Server Error (Error 500) Mini Troubleshooting Guide

Excellent. It Works! I really appreciate all the help. You have taught another noob another lesson. This may not seem like much, but it has been throwing me for a curve for 3 days now. Again, Thanks.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 08:45 AM.