Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Hi.
After upgrading cacti from 0.8.8h to 1.1.38 (did the upgrade process with the help of this great article - https://www.cacti.net/downloads/docs/html/upgrade.html) the graph tree view is harrassed with this warning message:
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: no parameters were bound in /var/www/cacti/lib/database.php on line 262
I am no good in PHP or actually in programming generally, so even though I looked into the file mentioned above, I was left with the bitter taste of defeat.
The odd thing is, that the message disappears while using other accounts. I tried to use different browsers, clear cache, nothing helped.
Thanks.
Last edited by HSE on Mon Dec 10, 2018 10:26 am, edited 1 time in total.
$default_tree_id = db_fetch_cell('SELECT graph_tree.id
FROM graph_tree
INNER JOIN user_auth_perms ON user_auth_perms.item_id = graph_tree.id
AND user_auth_perms.type = 2
AND user_auth_perms.user_id = ?
WHERE graph_tree.enabled = "on"
ORDER BY graph_tree.id
LIMIT 1',
array($_SESSION['sess_user_id']));
So, this would appear to be the code that is failing. You should not be receiving the above error as the session should be logged in (ses_user_id is the logged in user). If session isn't set, check that the PHP Session module is actually installed/enabled for your web server.
I am running gentoo with PHP 5.6 (which I believe should be supported) and all of the required modules are installed (eg. mysql session sockets xml pcre snmp gd dom)
Not sure if you are familiar with gentoo but this is the PHP package compiled with all the necessary modules:
# equery u php
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for dev-lang/php-5.6.39:
U I
...
+ + apache2 : Add Apache2 support
+ + gd : Adds support for gd (bundled with PHP)
+ + mysql : Add mySQL Database support
+ + session : Add persistent session support
+ + snmp : Add support for the Simple Network Management Protocol if available
+ + sockets : Add support for tcp/ip sockets
+ + xml : Add support for XML files
...
That error is not actually the poller, but whenever you try to view the logs via Cacti. It is claiming that $external_id is not set, which seems to be causing a problem when attempting to convert one of the matched regex values back to a name. Something isn't quite right with the setup, I'm just can't see yet what it would be.
netniV wrote:That error is not actually the poller, but whenever you try to view the logs via Cacti. It is claiming that $external_id is not set, which seems to be causing a problem when attempting to convert one of the matched regex values back to a name. Something isn't quite right with the setup, I'm just can't see yet what it would be.
Where can I set this $external_id if it is some part of a variable which I can set?
And can I deliver some more information to you that could help determine the problem?