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 run ClamAV scan from SSH in cPanel server?

In this article, we'll discuss how to run ClamAV scan via SSH in cPanel/WHM server. ClamAV is one...

Difference Between su and sudo and How to Configure sudo in Linux VPS.

As we know Linux provides much better security. You can set user management policy and user...

How to install Dotnet Core on Centos 7 ?

Dotnet Core is now available with the Linux OS. Following are the steps to install Dotnet Core on...

Will internal traffic between two VPS viz. a Database Server and a Web Server be counted in my bandwidth usage?

Yes it will. The traffic will be counted in the bandwidth usage of your VPS. Even if you use...

What if I exceed the bandwidth limit I am assigned with VPS?

Our system continually monitors the bandwidth usage of all our VPS. In case if your total monthly...

  • 0 Users Found This Useful

Was this answer helpful?