I am testing a website online.
Right now, the errors are not being displayed (But I know they exist).
I have access to only the .htaccess
file.
How do i make all errors to display using my .htaccess
file
EDIT
I added these lines to my .htaccess
:
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
and the pages NOW display
Internal server error
If you want to see only fatal runtime errors:
I feel like adding more details to the existing answer :
Give 777 or 755 permission to the log file and then add the code
at the end of .htaccess. This will protect your log file. These options are suited for development server. For production server you should not display any error to the end user. So change the display flags to off.
For more info follow this link : Advanced PHP Error Handling via htaccess
.htaccess:
To turn the actual display of errors on.
To set the types of errors you are displaying, you will need to use:
Combined with the integer values from this page: http://php.net/manual/en/errorfunc.constants.php
Note if you use -1 for your integer, it will show all errors, and be future proof when they add in new types of errors.