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

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

IMP : Ensure that you take the backup of your existing .htaccess file before making any changes. Incorrect .htaccess may cause the issue to your website and it may become inaccessible. 

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

Related Articles

How to install Git on Centos7?

Git is a famous version-control system. Git is used to tracking the changes made on your code as...

How to Enable Plaintext Authentication in Dovecot?

Dovecot is an Open source IMAP or POP3 server used to create light-weight and high-performance...

Is it possible to take complete VPS backup in VPS itself?

Please note that, there is no provision to take backup of full VPS image in VPS itself. As an...

How to verify Linux System Is 32-bit or 64-bit?

You will find 64-bit OS in most modern computers. It is always recommended to have a 64-bit OS...

How to Run Multiple PHP versions with Nginx on Ubuntu?

You can run multiple php versions on Ubuntu without any issue. You require Multiple php versions...

  • 0 Users Found This Useful

Was this answer helpful?