Critical error on clicking users Critical error on clicking users
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Critical error on clicking users

Started by shortyloz, December 31, 2010, 02:42:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shortyloz

Hello,
I am very new to this game and currently setup this test install as part of my getting ready to launch to our camera club.

http://www.photosbymarkharris.com/cmgallery

Installed all the files using filezilla
Run the install.php process all works OK

I have set up a number of categories and albums as a test structure and all appears OK.  However, when I click on users to setup new users in advance, I get this error

Critical error
There was an error while processing a database query...

In the logfile I get this error which means nothing to me.... help!

Dec 31, 2010 at 01:37 PM - While executing query 'SELECT user_id AS user_id, user_name AS user_name, user_email AS user_email, UNIX_TIMESTAMP(user_regdate) AS user_regdate, UNIX_TIMESTAMP(user_lastvisit) AS user_lastvisit, user_active AS user_active, COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota FROM `web125-dbase`.cpg15x_users AS u INNER JOIN web125-dbase.cpg15x_usergroups AS g ON u.user_group = g.group_id LEFT JOIN web125-dbase.cpg15x_pictures AS p ON p.owner_id = u.user_id GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25;' in bridge/udb_base.inc.php on line 230 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-dbase.cpg15x_usergroups AS g ON u.user_group = g.group_id LEFT JOIN web125-dbas' at line 1


I would welcome your guidance and suggestions for next steps...

Thanks
Mark

Αndré

Quote from: Αndré on December 15, 2010, 09:07:25 AM
Open bridge/udb_base.inc.php, find
        $sql = "SELECT {$f['user_id']} AS user_id, {$f['username']} AS user_name, {$f['email']} AS user_email, {$f['regdate']} AS user_regdate, {$f['lastvisit']} AS user_lastvisit, {$f['active']} AS user_active, "
               . "COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota "
               . "FROM {$this->usertable} AS u "
               . "INNER JOIN {$C['dbname']}.{$C['TABLE_USERGROUPS']} AS g ON u.{$f['usertbl_group_id']} = g.group_id "
               . "LEFT JOIN {$C['dbname']}.{$C['TABLE_PICTURES']} AS p ON p.owner_id = u.{$f['user_id']} "
               . $options['search']
               . "GROUP BY user_id " . "ORDER BY " . $sort_codes[$options['sort']] . " "
               . "LIMIT {$options['lower_limit']}, {$options['users_per_page']};";

and replace with
        $sql = "SELECT {$f['user_id']} AS user_id, {$f['username']} AS user_name, {$f['email']} AS user_email, {$f['regdate']} AS user_regdate, {$f['lastvisit']} AS user_lastvisit, {$f['active']} AS user_active, "
               . "COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota "
               . "FROM {$this->usertable} AS u "
               . "INNER JOIN `{$C['dbname']}`.{$C['TABLE_USERGROUPS']} AS g ON u.{$f['usertbl_group_id']} = g.group_id "
               . "LEFT JOIN `{$C['dbname']}`.{$C['TABLE_PICTURES']} AS p ON p.owner_id = u.{$f['user_id']} "
               . $options['search']
               . "GROUP BY user_id " . "ORDER BY " . $sort_codes[$options['sort']] . " "
               . "LIMIT {$options['lower_limit']}, {$options['users_per_page']};";


shortyloz

This worked perfectly, thank you so much...

Thanks for now.
Mark

pimp62


top dawg

Is this a bug or what exactly is happening? I have the same problem and the same error in the log, but the new code does not resolve my issue.

Αndré

Quote from: top dawg on January 16, 2011, 07:54:03 PM
I have the same problem and the same error in the log, but the new code does not resolve my issue.
Please post the exact error log and a link to your gallery if you need support.