Announcement

#1 2022-11-21 17:15:22

f3red
Member
Cold Springs (Reno), NV, USA
2015-06-11
71

Mysql error 1064 after 13.2.0 update

Aloha,

We have recently noticed some albums in our gallery are unable to be accessed, reporting mysql error 1064. Reported errors follow a similar pattern.

Examples follow (an unknown number of other albums also have this behavior):

ERROR 1
Link: https://photos.384thbombgroup.com/index … egory/2104
This album link, titled "A2 Jacket Art”, is found on the main page of this gallery.

Error message:
Warning:  [mysql error 1064] 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 'ASC' at line 7

SELECT DISTINCT(image_id)
  FROM piwigo384_image_category
    INNER JOIN piwigo384_images ON id = image_id
  WHERE
    category_id = 2104
AND (category_id NOT IN (2199,3331,5344) AND level<=8)
   ORDER BY rank ASC
; in /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/dblayer/functions_mysqli.inc.php on line 847

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/section_init.inc.php(317): query2array('\nSELECT DISTINC...', NULL, 'image_id') #1 /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/index.php(12): include('/home/u_group/p...') #2 {main} thrown in /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/dblayer/functions_mysqli.inc.php on line

Also...

ERROR 2
Link: https://photos.384thbombgroup.com/index … egory/5253
This album link, titled “Jeanne050”, is found in the Community album.

Error message:
Warning:  [mysql error 1064] 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 'ASC' at line 7

SELECT DISTINCT(image_id)
  FROM piwigo384_image_category
    INNER JOIN piwigo384_images ON id = image_id
  WHERE
    category_id = 5253
AND (category_id NOT IN (2199,3331,5344) AND level<=8)
   ORDER BY rank ASC
; in /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/dblayer/functions_mysqli.inc.php on line 847

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/section_init.inc.php(317): query2array('\nSELECT DISTINC...', NULL, 'image_id') #1 /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/index.php(12): include('/home/u_group/p...') #2 {main} thrown in /home/u_group/preller.us/384thBombGroupWebsite/htdocs/piwigo_384th_gallery/include/dblayer/functions_mysqli.inc.php on line 908


Environment

    Piwigo 13.2.0 Check for upgrade
    Installed on 7 June 2015, 7 years 5 months 1 week 6 days ago
    Operating system: Linux
    PHP: 7.4.30 (Show info) [2022-11-21 08:05:14]
    MySQL: 8.0.28-0ubuntu0.20.04.3 [2022-11-21 08:05:14]
    Graphics Library: External ImageMagick 6.9.7-4
    Cache size N/A   never calculated Refresh

Activated plugin list 19

    Admin Tools
    Autocorrect Filename
    Back2Front
    Batch Downloader
    Charlie's content 3.2.4
    Check Files Integrity
    Comments on Albums
    Community
    Contact Form
    Custom Download Link
    Edit Filename
    Exif View
    Extended Description
    File Uploader
    Image Preview
    LocalFiles Editor
    Photo Update
    Piwigo Donate
    prevnext


Piwigo URL: https://photos.384thbombgroup.com/

Offline

 

#2 2022-11-21 17:26:05

erAck
Only trying to help
2015-09-06
2026

Re: Mysql error 1064 after 13.2.0 update

Problem is the unescaped rank word where rank is now a keyword in MySQL. There are about a dozen threads on this in the forum. Search. It boils down to changing the album sort once to another ordering and then back to ranking, with which the escaped word is written to the database and used later.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-11-21 18:22:16

f3red
Member
Cold Springs (Reno), NV, USA
2015-06-11
71

Re: Mysql error 1064 after 13.2.0 update

Thanks. That cured my problem. I was a bit disappointed that it had to be done on an album-by-album basis - I would have thought Piwigo would protect against this, especially with the latest update.

Anyway, it works and we are back to "normal" operation - and we know what to do when it happens to other albums.

rfp

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact