Horje
How to disable PHP error logs

By default, PHP errors and warnings generated by your websites are logged in error_log files in the directory where your PHP files are located. The PHP error_log files can grow to a large size.

If you do not need the error_log file you can disable PHP error logging using one of the three ways listed below:

 


Method - 1 Disable PHP Error Logs

PHP Selector in cPanel — Recommended

  1. Log in to cPanel.
  2. Click Select PHP Version .
  3. Click Switch To PHP Options
  4. Set log_errors to Off
  5. Click Save

Method - 2 Disable PHP Error Logs

Edit .htaccess in your public_html folder
Enter the following code:

<IfModule php7_module> php_flag log_errors off
</IfModule>





Related Articles
How to disable PHP error logs Cpanel Logs Tutorial


Category :
Web Tutorial
Sub Category :
Cpanel Logs Tutorial
Uploaded by :
Admin


Read Article
https://horje.com/learn/1434/reference