How to fix 500 Internal Server Error

Posted by Bounceweb in Web Hosting Tips

1 Star2 Stars (No Ratings Yet)

Sites hosted in cPanel server, where php is handled with suPHP, the majority of internal server errors (error 500), can be solved verifying and modifying files and folder permissions. If you use permission 777 (grant all permissions to owner, group and public), this error may ocurr. The best way is to change folder permissions (chmoding) to 755 and files to 644 (except if specified by the software developer).

You can mass change all the files and folders permissions in case that you change from another host that didn’t had this problem. Changing tons of folders maybe a hard task, so let’s go with a simple way:

To change all folder permissions to 755, open SSH and type:

find /home/*/public_html -type d -exec chmod 755 {} \;

To change all file permissions to 644, opeen SSH and type:

find /home/*/public_html -type f -exec chmod 644 {} \;

Another common reason for this error is the .htaccess file trying to change PHP flags. Some hosts don’t allow that (only changing php.ini files).  Open your .htaccess files and check for entries like “php_flag” e “php_value”. If you find any, clean it, and you are ready to go!

Be Sociable, Share!

Leave a Reply

You must be logged in to post a comment.