By default, if there is a PHP error, it is not displayed on the screen to the user. This is done for security reasons, but it does not aid the programmer in troubleshooting the issue. If you place some code within the .htaccess file, you can turn on the error display. The following code is used to turn on the error display for troubleshooting purposes:
php_flag display_errors on
php_value error_reporting 7
To add this code, perform the following:
- Use putty to log into server.
- cd to the appropriate /home/<users>/www directory
- nano .htaccess
- Copy and paste the code above to the file
- Save the .htaccess file… control/o
If you now refresh the page, you should see the error and you can be off to troublshoot!
No comments:
Post a Comment