suhosin error with cacti

Problem: Debian squeeze, suhosin and cacti interworking issue

Symptoms: following entries in syslog

May 25 09:54:02 machine suhosin[12340]: ALERT – script tried to increase memory_limit to 536870912 bytes which is above the allowed value (attacker ‘REMOTE_ADDR not set’, file ‘/usr/share/cacti/site/poller.php’, line 210)
May 25 09:54:02 machine suhosin[12343]: ALERT – script tried to increase memory_limit to 536870912 bytes which is above the allowed value (attacker ‘REMOTE_ADDR not set’, file ‘/usr/share/cacti/site/cmd.php’, line 64)

Solution:

  • edit /etc/php5/conf.d/suhosin.ini suhosin.memory_limit = 256M
  • edit /etc/php5/apache2/php.ini memory_limit = 256M
  • edit /etc/php5/cli/php.ini memory_limit = 256M
  • edit /usr/share/cacti/site/poller.php ini_set(“memory_limit”, “256M”);
  • edit /usr/share/cacti/site/cmd.php ini_set(“memory_limit”, “256M”);
  • /etc/init.d/apache2 restart

Further discussion:

http://forums.cacti.net/about38789.html

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566609

Leave a Reply

Your email address will not be published. Required fields are marked *