Advanced search  

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

Pages: [1]   Go Down

Author Topic: Critical error on clicking users  (Read 3522 times)

0 Members and 1 Guest are viewing this topic.

shortyloz

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Critical error on clicking users
« on: December 31, 2010, 02:42:44 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Critical error on clicking users
« Reply #1 on: December 31, 2010, 04:54:40 pm »

Open bridge/udb_base.inc.php, find
Code: [Select]
        $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
Code: [Select]
        $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']};";
Logged

shortyloz

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Critical error on clicking users
« Reply #2 on: December 31, 2010, 07:46:03 pm »

This worked perfectly, thank you so much...

Thanks for now.
Mark
Logged

pimp62

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Critical error on clicking users
« Reply #3 on: January 07, 2011, 10:07:25 pm »

Merci beaucoup !!!
Logged

top dawg

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Critical error on clicking users
« Reply #4 on: January 16, 2011, 07:54:03 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Critical error on clicking users
« Reply #5 on: January 17, 2011, 04:38:42 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.