Apache error log for a particular domain took a lot of disk space on a server

Created:

2016-11-16 12:57:24 UTC

Modified:

2017-08-16 18:29:41 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache error log for a particular domain took a lot of disk space on a server

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux

Symptoms

error_log file is being filled very fast, it has huge size and takes a lot of space on a server. Log files contains the following errors:

PHP message: PHP Warning:  feof() expects parameter 1 to be resource, null given in /var/www/vhosts
PHP Notice: Use of undefined constant subcat - assumed 'subcat' in /var/www/vhosts/mittalmachinery.com/httpdocs/right_menu.php on line 54

Cause

Too many errors are written to a log file due to incorrect website coding. And php.ini file for a domain logs all actions, including warnings and notices.

Resolution

  1. Contact web-developer to fix the issue with website coding

  2. To exclude php warnings from being written to logs, modify error_reporting value for PHP Settings for a domain:

Domains > example.com > PHP Settings

    error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING

This value will exclude warnings and notices from being logged.

Additional information

#214028749 How to set error_reporting option in PHP settings page

Have more questions? Submit a request
Please sign in to leave a comment.