How to solve HTTP Error 500 Internal server in php

02nd, January 2018 By

Once i have working on one of my client website and seen the after loading page some time i will getting again and again ‘500 – Internal server error’. At that time not in my mind by this error occur,why the page not loading and giving this error.I have tried to solve this error and at last i have solved this error.Today i will explain you how i will solve this error.

 

500 internal server error

Mostly you will have to see what is causing this error on your website.For this you have to check the error log files on your server.You will find out the error log files on you server here

/var/log/httpd/error_logs (/var/log/lighttpd/error_log or /var/log/httpd/error_log)

or

/var/log/message

Now on error log files i have seen the the script was time out after every 45 seconds.This is the time after that i have facing the 500 internal server error.This error because of mod_fcgid.

For fix this error and change the script load time from 45 second to any .

1.  Goes to FTP of your server.

2.  Then find the file fcgid.conf using this path

/etc/httpd/conf.d/fcgid.conf

3.  Here you will find this variable

FcgidIOTimeout 45

changed this to

FcgidIOTimeout 3600

4. Now refresh page and you will not getting 500 internal server error on your website.

Another Reasons For 500 Error

1) An invalid directive in an .htaccess or other config file.The most cases this will we the reason for the 500 internal server error.

2) Missing your php.ini file or not able to read php.ini file.You will have to check the php.ini file on your server with path /etc/php.ini or /chroot/etc/php.ini.

3) Limitation caused by file system like php log file size set to be small etc.

Hope there given reasons are the cause of your website “500 internal server error” and you will got solved it using this help.

Leave a Reply

Your email address will not be published. Required fields are marked *