Page 1 of 1

Problem with over 50 users

Posted: Mon Nov 01, 2010 4:37 pm
by niebais
Hi,
I'm experiencing this problem now that I have over 50 users:

SQL: SQL Error [nagiosxi] : ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.


The way to duplicate the problem:
1) Add 51 users
2) Click on Admin->Manage Users
3) click on the blue "next" arrow and you'll get the sql error.

The reason why I bring this up is that the search box doesn't always pull the user up making it difficult to find the person.

Re: Problem with over 50 users

Posted: Tue Nov 02, 2010 10:36 am
by admin
Thanks for the report! This is a bug in the code, which we'll push out a fix for in the next release.

For an immediate fix, you can change line 229 of /usr/local/nagiosxi/html/admin/users.php from:

Code: Select all

	$sql=limit_sql_query_records($sql_args,DB_NAGIOSXI);
to:

Code: Select all

	global $cfg;
	$sql=limit_sql_query_records($sql_args,$cfg['db_info'][DB_NAGIOSXI]['dbtype']);

Re: Problem with over 50 users

Posted: Tue Nov 02, 2010 2:25 pm
by niebais
Very nice, that fixed it right up. I'll update to the next release as soon as you guys get it out. Thanks!