Prehistory: Upgraded cacti to 0.8.7a a couple of weeks ago during a regular “apt-get dist-upgrade” run.
Today I checked my Cacti installation to gather some intel on a performance/latency issue that we are currently encountering on a network link. As all graphs are blank since mid of October (hey, I am only checking in to Cacti when there are issues to take care of) I went ahead and tried to manually run the poller:
root@host: [~] /usr/share/cacti/site/poller.php
/usr/share/cacti/site/poller.php: line 1: ?php: No such file or directory
/usr/share/cacti/site/poller.php: line 2: /bin: is a directory
/usr/share/cacti/site/poller.php: line 3: +-------------------------------------------------------------------------+: command not found
/usr/share/cacti/site/poller.php: line 4: syntax error near unexpected token `|'
/usr/share/cacti/site/poller.php: line 4: ` | Copyright (C) 2004-2007 The Cacti Group |'
Looking at the source of poller.php did not really reveal anything obvious which made me start searching the Cacti forum, Google and Debian Bugs. Looks like I am pretty much alone with the problem so far…
Probably that’s the price you pay for running cutting edge (*zang*) Debian unstable.
fsck.
February 20th, 2009 at 18:59
hello!
I’am the same error, and I seek the solution
R. Suinot
February 21st, 2009 at 15:49
hello!
Sorry for my very poor english;
The solution is in the cron command!
in /etc/cron.d/cacti
change
# */5 * * * * www-data php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
for
# */5 * * * * www-data /usr/bin/php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
R. Suinot