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"
  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to add my SSH key to Github/Bitbucket?

Are you looking to deploy your websites using GitHub or Bitbucket to Accuwebhosting? It is very...

How to Upgrade PHP Version in cPanel/WHM Server?

Following article will assist you to upgrade PHP version in cPanel/WHM server. This article is...

How to Install Visual Studio Code on CentOS 7?

Visual Studio Code is a Microsoft Product and an open-source cross-platform code editor. It...

How to change Magento site URL from phpMyAdmin?

Magento is a widely used E-commerce store management system. In this article, we will show you...

How to Install and configure Dovecot on CentOS?

Dovecot is used to receive incoming emails on your server from Postfix. Dovecot is an open-source...