Httpd-error.log getting too large

gutiersa wrote on Saturday, December 10, 2011:

Hi,

I keep getting these notices in my httpd-error.log:

  Digest: generating secret for digest authentication …
  Digest: done
  Apache/2.2.13 (FreeBSD) mod_ssl/2.2.13 OpenSSL/0.9.8l DAV/2 PHP/5.2.11 with Suhosin-Patch configured - resuming normal operations
/usr/local/www/apache22/openemr/controllers/C_Document.class.php(33) : Notice - Undefined index:  patient_id
/usr/local/www/apache22/openemr/controllers/C_Document.class.php(35) : Notice - Undefined index:  patient_id
/usr/local/www/apache22/openemr/library/classes/Tree.class.php(54) : Notice - Undefined property: CategoryTree::$root_type
/usr/local/www/apache22/openemr/library/classes/Tree.class.php(94) : Notice - Undefined offset:  1
/usr/local/www/apache22/openemr/library/classes/Tree.class.php(94) : Notice - Undefined offset:  0
/usr/local/www/apache22/openemr/library/classes/Tree.class.php(94) : Notice - Undefined offset:  0
/usr/local/www/apache22/openemr/library/classes/Tree.class.php(94) : Notice - Undefined offset:  0
/usr/local/www/apache22/openemr/library/classes/Tree.class.php(94) : Notice - Undefined offset:  0

these have made the log become up to 5 gigabytes large. then my server crashes because /var runs out of space.

In appache conf file I have error logging set to crit

how can I fix this problem in the code, or better yet, I want appache not to log notices.

I would appreciate any help.

Sandra

yehster wrote on Saturday, December 10, 2011:

Sandra,
You should edit your php.ini file for apache. Not sure where it resides on FreeBSD or your particular install, but there is an error_log setting for php, and you want to include ~E_NOTICE. to turn off reporting of undefined notices and such.
http://www.open-emr.org/wiki/index.php/FAQ#What_are_the_correct_PHP_settings_.28can_be_found_in_the_php.ini_file.29_.3F
http://php.net/manual/en/errorfunc.configuration.php

gutiersa wrote on Saturday, December 10, 2011:

ty so much. just in case for others, the file in freebsd it is  /usr/local/etc/php.ini

sandra