PHP Error with THOLD Cacti Plugin
I've installed the new Cacti 1.2.30 version on a Debian 6.1.135-1 server. The php version installed is 8.2.28. The THOLD plugin installed is the 1.8.2. These packages were downloaded from the latest Github available versions.
I'm observing the threshold plugin gets disabled sporadically. According to the logs, the errors are the following:
2025-06-25 07:18:22 - CMDPHP ERROR: debounce key was truncated from debounce_page_error_thold_graph.php?headercontent=true to debounce_page_error_thold_graph.php?headercontent= Backtrace: (/help.php[43]:debounce_run_notification(), /lib/functions.php[7442]:cacti_debug_backtrace()) 2025-06-25 07:18:22 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'thold' 2025-06-25 07:18:22 - ERROR PHP ERROR in Plugin 'thold': Uncaught TypeError: Unsupported operand types: string * int in /var/www/html/cacti/plugins/thold/thold_graph.php:388 Stack trace: #0 /var/www/html/cacti/plugins/thold/thold_graph.php(56): tholds() #1 {main} thrown in file: /var/www/html/cacti/plugins/thold/thold_graph.php on line: 388
Any idea what can cause the errors or why the cacti application disables the plugin?
Thank you,
Please use fixed version from https://github.com/Cacti/plugin_thold/ (develop branch)
Good morning, I believe that is the same version I downloaded a few months ago. Was there a recent change to the same version?
Thank you for your response.
Someone told there's a more stable php version than the 8.2.28 version I have installed. Can this be the case?
Version is the same but in develop branch are fixes for your problem. Download it and replace files
@xmacan, is it time for a release?
I don't know about any problems with actual develop.
Thank you for your support. I've downloaded the develop version and replaced the files. I'll monitor the progress.
Good morning, after installing the develop branch version I did notice a more stable behavior but still every 2 or 3 days the plugin gets disabled. Now the problem I have is that I don't see any error messages in the cacti log.
If there's any idea that can help resolve this issue, I'd appreciate some insight.
Thank you.
Search for "DISABLING" in your Cacti logs. When you find the file that includes it, open the file and there will be a ERROR and backtrace just before the DISABLING term. Post that here.
I had to retrieve the information several days back with the backup files.
07/16/2025 14:02:01 - ERROR PHP ERROR in Plugin 'thold': Uncaught TypeError: Unsupported operand types: string * int in /var/www/html/cacti/plugins/thold/thold_graph.php:388 Stack trace: #0 /var/www/html/cacti/plugins/thold/thold_graph.php(56): tholds() #1 {main} thrown in file: /var/www/html/cacti/plugins/thold/thold_graph.php on line: 388 07/16/2025 14:02:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 07/16/2025 14:02:01 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'thold' 07/16/2025 14:02:01 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email. 07/16/2025 14:02:01 - CMDPHP WARNING: Cacti Page:thold_graph.php?headercontent=true for User:noc Generated a Fatal Error:500 07/16/2025 14:02:01 - CMDPHP ERROR: debounce key was truncated from debounce_page_error_thold_graph.php?headercontent=true to debounce_page_error_thold_graph.php?headercontent= Backtrace: (/help.php[43]:debounce_run_notification(), /lib/functions.php[7442]:cacti_debug_backtrace()) 07/16/2025 14:02:01 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.
Thanks for your reply.
Are you running this on top of Cacti 1.3?
Post lines 377 through 381 in thold_graph.php.
I'm running on Cacti 1.2.30. The lines are the following:
if (get_request_var('rows') == -1) {
$rows = read_config_option('num_rows_table');
} else {
$rows = get_request_var('rows');
}
@msfraticelli It was fixed in develop few weeks ago. Update from develop branch or change lines: if (get_request_var('rows') == -1) { $rows = intval(read_config_option('num_rows_table')); } else { $rows = intval(get_request_var('rows')); }
Do you also have installed and enabled monitor plugin?
I've update the plugin with the develop branch version. I appreciate your support.
Yes, I do have installed and enabled the monitor plugin. It's on version 2.8.
Thank you.
@msfraticelli It was fixed in develop few weeks ago. Update from develop branch or change lines: if (get_request_var('rows') == -1) { $rows = intval(read_config_option('num_rows_table')); } else { $rows = intval(get_request_var('rows')); }
Do you also have installed and enabled monitor plugin?
Just so you know, after applying the new develop version, the plugin has maintained stable. Thank you.
I've noticed this happen myself. It happens after a session timeout and for some reason, the session is renewed and the stored version of the value becomes corrupted. @xmacan, I think we need to do something in the read_config_option() function call to validate this setting as it's tied to so many things until such time as we find the root cause of the issue.
Sorry guys. Super busy these days.
It hasn't happened to me yet, but several people are dealing with it. The problem with the "rows" variable was also in the monitor plugin, but I fixed it there. I think it was possible to save the word 'default' instead of a number as the number of rows. But why did it start happening only now? What is it related to?