| How to view PHP error on Internet Explorer thru IIS Webserver? |
| Written by Siamkia | |
| Monday, 15 December 2008 | |
|
Do you ever receive HTTP 500 Internal Server Error when try to view your PHP file? Puzzling for the error that you see and does not know what is the actual error? For PHP, after you install it on your web server, by default, you will not able to see PHP error thru Internet Explorer directly. This is because PHP configuration was set to not displaying error on Web browsers by default to prevent exposure of security information. Keeping PHP configuration to display error on web browsers may reveal security information to end users, such as file paths on your Web server, your database schema or other information.Hence, if you are not debugging your web page on local machine, you are not recommended to enable PHP configuration to display errors on web browser.Make sure you only enable this function in your local machine only. To enable this function, you need to open your PHP configuration file - php.ini. By default installation, it will be in c:\Program Files\php\. After you open it, search for text 'display_errors'. By default, you will see the setting as following. display_errors = off To enable it, just change it to 'on' as following display_errors = on. Do not rush to refresh your HTTP 500 Internal Server Error page now, as you are required to restart your IIS to make this effective. To restart IIS, go to Start > Run > key in iisreset and then enter it. A command prompt screen will appear. Once it is done, you can refer your php page now.
|
|
| Last Updated ( Monday, 15 December 2008 ) |