Tag: php

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’,…

PHP class returning data one by one

Prototyping for a class returning items one by one <?php class printer { function printer() { $in = new data(); while($line = $in->getNext()) { echo $line; echo “\n”; } return; } } class data { function __construct() { $this->i =…