Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to enable error-log.txt logging using .htaccess file?

You need to add the lines given below in the .htaccess file if you want your PHP errors within the error_log file instead of the .logs folder – 

# log PHP errors to a file
php_flag log_errors on
php_value error_reporting 32767
php_value error_log "error_log.txt"


Important
Ensure that you take the backup of your existing .htaccess file before making any changes. Incorrect .htaccess may cause an issue with your website, making it inaccessible.

 


Was this answer helpful?

« Back

chat