Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Critical error when I active "Visitors can upload files *"  (Read 2240 times)

0 Members and 1 Guest are viewing this topic.

marraqy

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Critical error when I active "Visitors can upload files *"
« on: January 04, 2017, 04:09:52 pm »

Hi, I'll try to describe my error:

1-) with admin account I create a album, then I active the option in properties "I Visitors can upload files *"

2-) with a simple registered user, i try upload file, then error happen, I receive this message:

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

with debug mode:
While executing query 'SELECT DISTINCT c.cid, c.rgt, c.name FROM cpg15x_albums AS a RIGHT JOIN cpg15x_categories AS c ON a.category = c.cid WHERE c.cid = 1 OR a.owner = 2 OR uploads = "YES" ORDER BY lft' in include/functions.inc.php on line 6034

mySQL error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'dbfotos.c.lft' which is not in SELECT list; this is incompatible with DISTINCT

File: /var/www/html/fotos/include/functions.inc.php - Line: 272



I try reinstall with another version, like 1.6, however the error stay. Any help to solution this error?
Logged

marraqy

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Critical error when I active "Visitors can upload files *"
« Reply #1 on: January 05, 2017, 12:26:48 am »

Hi, after some research i found this solution:

Edit this file (/etc/mysql/my.cnf), and add this query:

[mysqld]
sql-mode=""

Then error is fixed.

Thanks,
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15651
Re: Critical error when I active "Visitors can upload files *"
« Reply #2 on: June 30, 2017, 01:49:14 pm »

Edit this file (/etc/mysql/my.cnf), and add this query:

[mysqld]
sql-mode=""

That solution isn't available to everybody, so I tried to replicate the issue to create a fix. Unfortunately I wasn't able to replicate it. It should be fixed by adding
Code: [Select]
c.lft to the SELECT list, but I don't know if it creates any side effects.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.