Horje
How to disable PHP error logs | Cpanel Logs Code
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>



Read Full::
Cpanel Logs Code
Category:
Cpanel Tutorial Code
Sub Category:
Cpanel Logs Code
Uploaded:
3 weeks ago
Uploaded by:
Admin
Views:
11

Related Articles
How to disable PHP error logs Cpanel Logs Code

Single Articles

Share on: