Internal Server Error (Error 500) Mini Troubleshooting Guide

All about web hosting, reseller hosting, cpanel, optimization, using your hosting plan, etc.

Internal Server Error (Error 500) Mini Troubleshooting Guide

Postby Andrew » Mon Dec 14, 2009 3:01 pm

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:

Code: Select all
Premature End of Script Headers


CGI/Perl Script missing the Context-Type variable. You should add it to your script.

Example:
Try adding the -w flag to it too

Code: Select all
#!/usr/bin/perl -w
print "Content-type: text/plain\n\n";
print "testing...\n";


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

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:

Do not use php_value on our shared servers, they are suPHP.
Instead, set the values in your php.ini file.
Code:

Code: Select all
php_value register_globals on



On php.ini:

Code: Select all
register_globals=On


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

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.
Andrew
 
Posts: 20
Joined: Fri Dec 11, 2009 5:56 am

Return to Shared hosting

Who is online

Users browsing this forum: No registered users and 1 guest

cron