SQL errors - possible caused by upgrade from 0.8.6 to 0.8.7

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

Moderators: Developers, Moderators

Post Reply
pookey
Posts: 5
Joined: Wed Nov 15, 2006 4:40 pm

SQL errors - possible caused by upgrade from 0.8.6 to 0.8.7

Post by pookey »

I've noticed this in the logs:

Code: Select all

 10/31/2007 02:18:55 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select value from settings_graphs where name='custom_fonts' and user_id="
10/31/2007 02:18:55 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select value from settings_graphs where name='custom_fonts' and user_id="
10/31/2007 02:18:55 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select value from settings_graphs where name='custom_fonts' and user_id="
10/31/2007 02:18:55 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select value from settings_graphs where name='custom_fonts' and user_id="
10/31/2007 02:18:55 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select value from settings_graphs where name='default_datechar' and user_id="
10/31/2007 02:18:55 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select value from settings_graphs where name='default_date_format' and user_id="

This might have only started after upgrading from 0.8.6 to 0.8.7.

I have 'Authentication Method' set to none, with a 'default' user setup for 'Guest User'.

Does anyone know what might be causing this issue?
pookey
Posts: 5
Joined: Wed Nov 15, 2006 4:40 pm

Post by pookey »

patch

Code: Select all

# diff lib/functions.php.off lib/functions.php
69c69
<               $guest_uid = db_fetch_cell("SELECT id FROM user_auth WHERE username='guest'");
---
>               $guest_uid = db_fetch_cell("SELECT id FROM user_auth JOIN settings ON user_auth.username = settings.value WHERE settings.name='guest_user'");

User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Not the preferred method to fix the issue, but it works.

Please submit a bug to http://www.cacti.net/bugs.php
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
pookey
Posts: 5
Joined: Wed Nov 15, 2006 4:40 pm

Post by pookey »

done: 0001057
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Thank you! :D
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Resolved in SVN.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
weSh
Posts: 3
Joined: Thu Nov 08, 2007 7:39 am

Post by weSh »

rony wrote:Resolved in SVN.
ok, but how can i use svn to correct the bug ?

thx
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

this bugs seems to be corrected by SVN revision 4320

The diff is here : http://svn.cacti.net/cgi-bin/viewvc.cgi ... threv=4320

You should test it on a test Cacti server, or at least backup lib/functions.php
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
weSh
Posts: 3
Joined: Thu Nov 08, 2007 7:39 am

Post by weSh »

ok...
thanks a lot...

i'm going to try this...
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests