#1 2025-07-19 10:33:23

ianmac
Member
2016-07-30
38

Fatal error: Uncaught Error: Call to a member function fetch_assoc()

Hi,

There is a problem with displaying the folder 'Mobile Shops'!
I can get to Home / Occupations / Shops
https://swanlandheritage.info/piwigo/in … ategory/61
but when I click on 'Mobile Shops' I get ...

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 piwimi_image_category
    INNER JOIN piwimi_images ON id = image_id
  WHERE
    category_id = 75
AND (category_id NOT IN (350,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,401,407,444,466,469,470,472,476
,483,486,487,489,499,578,580,590,615,663,687,699,735,712,713,772,773,774,775,776,777,778,779,780
,781,782,796,797,800,443,520,411,410,409,490,492,491,603,449,457,664) AND level<=0)
   ORDER BY rank ASC
; in /home/swanland/public_html/piwigo/include/dblayer/functions_mysqli.inc.php on line 847


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



My environment details are ...
Piwigo 15.5.0 Check for upgrade
Installed on 21 June 2016, 9 years 3 weeks 5 days ago
Operating system: Linux
PHP: 8.0.30 (Show info) [2025-07-18 19:49:31]
MySQL: 8.0.42 [2025-07-18 20:49:31]
Graphics Library: ImageMagick ImageMagick 6.9.13-25
Cache size 3034.16 Mo   calculated 3 months ago Refresh

Activated plugin list 16
Admin Tools
Comments on Albums
Download Counter
Edit Filename
Exif View
Image Preview
Language Switch
LocalFiles Editor
Mobile Theme for Tablets
OpenStreetMap
pdf2tab
Photo Update
PHP Captcha for Piwigo
RV Akismet
Take A Tour of Your Piwigo
Theme Switch

Piwigo URL: http://swanlandheritage.info/piwigo/

Offline

 

#2 2025-07-19 11:05:20

erAck
Only trying to help
2015-09-06
2235

Re: Fatal error: Uncaught Error: Call to a member function fetch_assoc()

It's the old dreaded "rank became a keyword in MySQL 8 and needs to be escaped to `rank`" problem discussed in a dozen topics in this forum. The old rank ASC value is still stored in the database and needs to be changed to `rank` ASC. For that either switch the album's sort order to something else and then back to ranking, or replace your piwimi_categories table's column image_order where value is rank ASC to `rank` ASC


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

Offline

 

#3 2025-07-19 13:11:16

ianmac
Member
2016-07-30
38

Re: Fatal error: Uncaught Error: Call to a member function fetch_assoc()

I have deleted the offending folder and checked the folders and photos nearby and all seems to be OK.
Thank you erAck for your information, which gave me the confidence to do this.

Offline

 

Board footer

Powered by FluxBB