I am working on drupal7.
When I try to open the website, it gives internal server error:
HTTP Error 500 (Internal Server Error): An unexpected condition was
encountered while the server was attempting to fulfill the request.
But when we open this on Firefox, it does nothing. Any idea?
This is due to the error in the code.Enable error reporting and see what happens.
This code will help you-
ini_set('display_errors', '1');
error_reporting(E_ALL ^ E_NOTICE);
Read more- http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm
The PHP script gives an error but since your PHP settings are set to production mode it don't produces an error and leaves the error handling to your webserver (most of the times Apache).
You can do one of the following things:
- Locate the CORRECT php.ini file and change error_reporting to E_ALL and display_errors to 1 (restart server is neccesary).
- Put this in the first loaded PHP file (index.php?) error_reporting(E_ALL); ini_set('dislay_errors', 1);
- Each webserver has it's own error logs you can also check this in stead of let PHP output the error, see (http://httpd.apache.org/docs/2.0/logs.html).
But when you do one of the things above you only will see the error message, fixing the problem is step two.