0

Using Apache is it possible to edit the Virtual Host to exclude a certain absolute path (such as /var/www/html/blog/wp-content/plugins/my_plugin/) from log to the ErrorLog file?

I need to stop it from log warnings like this:

PHP Warning:  Illegal offset type in isset or empty in /var/www/html/blog/wp-content/plugins/my_plugin/tool.php 

However I need to see other warnings, it's only about one file that's the reason why I would like to keep my php.ini unaltered.

NineCattoRules
  • 179
  • 1
  • 3
  • 15

1 Answers1

1

That error message comes from php framework and mod_php, so the answer is no.

If you don't want to see them in httpd you will have to separate them (interpret php with php-fpm and proxy requests to it through mod_proxy_fcgi).

Apache httpd has no control over error messages generated by mod_php, so you do have to change php.ini or the above option, which I recommend (separation).

Daniel Ferradal
  • 2,415
  • 1
  • 8
  • 13