Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000512 [Cacti] Poller (cactid, cmd.php) tweak always 2005-07-07 11:49 2007-11-13 12:49
Reporter mikaelf View Status public  
Assigned To TheWitness
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 1.0.0-BETA Product Version 0.8.6e
  Target Version Product Build
Summary 0000512: fgets in lib/poller.php is not big enough
Description Note: our version is 0.8.6f.

there are three fgets in lib/poller.php
they use the (default) length of 1024 bytes of the input string.

This is not enough since our (currently) longest data source string is over 2500 bytes long.
Steps To Reproduce
Additional Information diff -urN cacti-0.8.6f/lib/poller.php cacti-0.8.6f-fgets-fix/lib/poller.php
--- cacti-0.8.6f/lib/poller.php 2005-07-07 17:48:36.000000000 +0200
+++ cacti-0.8.6f-fgets-fix/lib/poller.php 2005-07-07 17:48:21.000000000 +0200
@@ -42,7 +42,7 @@
                stream_set_timeout($fp, $script_timeout);

                /* get output from command */
- $output = fgets($fp, 1024);
+ $output = fgets($fp, 4096);

                /* determine if the script timedout */
                $info = stream_get_meta_data($fp);
@@ -85,7 +85,7 @@
                        fwrite($pipes[0], $command . "\r\n");

                        /* get result from server */
- $output = fgets($pipes[1], 1024);
+ $output = fgets($pipes[1], 4096);

                        /* determine if the script timedout */
                        $info = stream_get_meta_data($pipes[0]);
@@ -114,7 +114,7 @@
                        stream_set_timeout($fp, $script_timeout);

                        /* get output from command */
- $output = fgets($fp, 1024);
+ $output = fgets($fp, 4096);

                        /* determine if the script timedout */
                        $info = stream_get_meta_data($pipes[0]);
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0001085)
mikaelf (reporter)
2005-07-07 11:58

I should add that the _result_ of the above issue can be that no data will get added to your data sources (RRAs), or that just some of the fields you need get added.
(0001114)
TheWitness (developer)
2005-07-12 18:39

Resolved in CVS for BRANCH_0_8_6 and 0.9

- Issue History
Date Modified Username Field Change
2005-07-07 11:49 mikaelf New Issue
2005-07-07 11:58 mikaelf Note Added: 0001085
2005-07-07 21:31 TheWitness Status new => assigned
2005-07-07 21:31 TheWitness Assigned To => TheWitness
2005-07-12 18:39 TheWitness Status assigned => resolved
2005-07-12 18:39 TheWitness Fixed in Version => 0.9
2005-07-12 18:39 TheWitness Resolution open => fixed
2005-07-12 18:39 TheWitness Note Added: 0001114
2007-11-13 12:49 TheWitness Status resolved => closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker