Logfile Error: SQL syntax / Graph Tab

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

Moderators: Developers, Moderators

Post Reply
User avatar
Cookiekiller
Posts: 3
Joined: Tue Sep 10, 2019 5:29 am
Location: Germany
Contact:

Logfile Error: SQL syntax / Graph Tab

Post by Cookiekiller »

Hi, :D

I have freshly installed Cacti 1.2.18 and I get the following error in my log every time I open the graphs tab or refresh the graphs web page.
This behavior occurs in different browsers. (Firefox, Chrome, Edge)

Logfile (Pastebin)

My System:
  • OS: Ubuntu 20.04.2 LTS \n \l
  • RAM: 4 GB
  • CPU: 4 Cores
  • DB: 10.3.30-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
  • Cacti: 1.2.18
  • Spine: 1.2.17
How to fix this problem? I am grateful for any help.

Greetings Cookie
Last edited by Cookiekiller on Tue Aug 03, 2021 4:49 am, edited 1 time in total.
~~ Live long and prosper ~~~
User avatar
Cookiekiller
Posts: 3
Joined: Tue Sep 10, 2019 5:29 am
Location: Germany
Contact:

Re: Logfile Error: SQL syntax

Post by Cookiekiller »

The affected code is located in the file '/lib/html_tree.php' starting at line 117.

Code: Select all

117		$default_tree_id = db_fetch_cell('SELECT graph_tree.id
118			FROM graph_tree
119			INNER JOIN user_auth_perms ON user_auth_perms.item_id = graph_tree.id
120			AND user_auth_perms.type = 2
121			AND user_auth_perms.user_id = ?
122			WHERE graph_tree.enabled = "on"
123			ORDER BY graph_tree.id
124			LIMIT 1',
125			array($_SESSION['sess_user_id']));
Unfortunately, it is beyond my skills to be able to fix this error.

Greetings, Cookie
~~ Live long and prosper ~~~
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest