Newline character after last parameter

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

Moderators: Developers, Moderators

Post Reply
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Newline character after last parameter

Post by bulek »

Hi,

I remember on this board returning topic of newline character appended to the last output parameter of Data Input script. It caused sometimes incorrect number of parameters passed to rrdtool with newline character somewhere in between. It also caused that last recently proposed displaying "Last updated" using COMMENT had to be the last item defined in the graph.

It seems that php reads the newline character along with script output values. To avoid this you can make the following change.

Find in cmd.php the following line:
$out_data_array = ParseDelimitedLine(`$str`,$delimeter);
and change it to:
$out_data_array = ParseDelimitedLine(trim(`$str`),$delimeter);
I hope it solves some of your problems.

- bulek
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests