Closed Elix-g closed 5 years ago
Hi,
how about this (untested)?
replace whole line 147 in wmi_queries.php with:
foreach($_POST as $var => $val) {
replace whole line 122 in wmi_accounts.php with:
foreach($_POST as $var => $val) {
Just the DB error should remain.
There are a couple of depreciated bits with PHP 7.2, plus we need to also check on MySQL reserved words too as there have been a number of changes to both PHP/MySQL/MariaDB that have caused bugs where things worked previously.
What you have identified is normally one of those elements 👍
Hi,
deleting a stored query seems to work. Nonetheless, some error message in clog:
2019/07/22` 12:00:01 - CMDPHP PHP ERROR Backtrace: (/plugins/wmi/wmi_queries.php[97]:actions_queries(), /plugins/wmi/wmi_queries.php[150]:each(), CactiErrorHandler()) 2019/07/22 12:00:01 - ERROR PHP DEPRECATED in Plugin 'wmi': The each() function is deprecated. This message will be suppressed on further calls in file: /data/apache2_wwwroot/plugins/wmi/wmi_queries.php on line: 150
Deleting stored credentials still doesn't work. Errors in clog:
2019/07/22 12:02:46 - CMDPHP PHP ERROR Backtrace: (/plugins/wmi/wmi_accounts.php[76]:actions_accounts(), /plugins/wmi/wmi_accounts.php[122]:each(), CactiErrorHandler()) 2019/07/22 12:02:46 - ERROR PHP DEPRECATED in Plugin 'wmi': The each() function is deprecated. This message will be suppressed on further calls in file: /xxxxxxxxxxxxx/plugins/wmi/wmi_accounts.php on line: 122
Download the latest version as this should now be resolved in 0db7d13
Confirmed, errors are gone and clog is clean. But though, deleting Authentications still doesn't work. It doesn't throw any error message anymore, but the Continue button has no function.
Yea, totally missed the each errors. I'm doing my development on a dated version of PHP, so did not see them. I'm not sure I know what you mean about Continue button. Could this be the authentication tab?
Yea, it was the accounts tab. That is now fixed too, as should $ signs in the password or any other special character for that matter now.
I'm sorry, I was unprecise. Indeed I meant the Continue button in the confirmation dialogue that appears when deleting an Authentication. Deletion now works properly, thanks a lot! Just another detail: After an Authentication has been deleted, I'm forwarded to a site where something is missing ;-) Please see the following picture:
URL that is being called is https://xxxxxxxxxxxx/plugins/wmi/wmi_accounts.php?header=false.
Setting the header attribute to true and everything looks normal.
Yea, it needs the header=false taking off.
Perfect, works like a charm now. Many thanks again for your swift reaction!
BR, Elix
Dears,
I've installed the latest version of the WMI plugin in Cacti 1.2.4 and today again after upgrading to 1.2.5. Two issues: It's not possible to delete saved WMI queries and it's not possible to delete stored credentials. In both cases, the confirmation popup appears but upon confirmation button, nothing happens. I can find some according entries in clog.
Attempt to delete a query:
Attempt to delete credentials:
Appreciate any help on this!
BR, Elix