In graph management, when I select a graph & choose action "Place on a Tree" or "Create Aggregate graph" I received Validation error.
I tried to find solution on internet but can't fix it. May be there is some issue in my graphs.php file.
Can I replace graphs.php file or any other solution ?
Validation error in graph management
Moderators: Developers, Moderators
Re: Validation error in graph management
I did fix this with a small hack a long time ago. It's ugly but worked for me...
modify html_validate.php and change the fuction slightly:
function input_validate_input_number($value) {
$regex = "/tr_\d+/";
if ((!is_numeric($value) xor ($value=="plugin_autom8_device") xor ($value=="plugin_aggregate") xor preg_match($regex, $value)) && ($value != "")) {
echo "<h2>input_validate_input_number</h2>";
echo "Value: $value";
die_html_input_error();
}
}
Hope this helped you.
Greets
modify html_validate.php and change the fuction slightly:
function input_validate_input_number($value) {
$regex = "/tr_\d+/";
if ((!is_numeric($value) xor ($value=="plugin_autom8_device") xor ($value=="plugin_aggregate") xor preg_match($regex, $value)) && ($value != "")) {
echo "<h2>input_validate_input_number</h2>";
echo "Value: $value";
die_html_input_error();
}
}
Hope this helped you.
Greets
Re: Validation error in graph management
There is no file of html_validate.php in both /etc/cacti & /usr/share/cacti.gspoosi wrote:I did fix this with a small hack a long time ago. It's ugly but worked for me...
modify html_validate.php and change the fuction slightly:
function input_validate_input_number($value) {
$regex = "/tr_\d+/";
if ((!is_numeric($value) xor ($value=="plugin_autom8_device") xor ($value=="plugin_aggregate") xor preg_match($regex, $value)) && ($value != "")) {
echo "<h2>input_validate_input_number</h2>";
echo "Value: $value";
die_html_input_error();
}
}
Hope this helped you.
Greets
Do i need to create that file & modify it ?
Re: Validation error in graph management
I have it under:
/usr/share/cacti/lib/html_validate.php
This is the reason nobody wants to help anymore...
ffs just grep for it..
grep -rnw */*.php -e "function input_validate_input_number"
/usr/share/cacti/lib/html_validate.php
This is the reason nobody wants to help anymore...
ffs just grep for it..
grep -rnw */*.php -e "function input_validate_input_number"
Who is online
Users browsing this forum: No registered users and 2 guests