graph_image png contains errors

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
whinis
Posts: 1
Joined: Thu Nov 12, 2015 9:27 am

graph_image png contains errors

Post by whinis »

So, I recently installed and go working 0.8.8f cacti using cmd.php as the poller on a debian server. I noticed that after a few hours none of the graphs showed, so I started to typical debug and checked that the rrds were made, checked that there were no errors in the error log and everything seemed fine except that the graphs were not being made. So I then went into graph debug mode and took the command its using and put it in a terminal and the image output was perfectly fine. Further debugging I downloaded one of the "corrupted" png files from graph_image.php and opened it in a text editor to compare to the working image output by the command line and the text looked exactly the same, except that the graph_image version had a new line in front of the png header.

Further debugging this I started to var_dump the output of the rrdtool execute and notice that there was no new line there. Somewhere between the top of the script and the rrdtool_execute a new line is being output preventing the image from displaying in the browser. I am looking for help on how to debug this.

EDIT: Final debug, I got it to work, ob_start and ob_end_clean does not pick up characters outside of <?php ?> tags. The debian.php config file in /etc/cacti had a space before the opening <?php tag which caused it to be outputted to the page. removing this space allowed the images to display again.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest