Hi,
I upgraded from Fedora 26 to Fedora 27 last night and now Piwigo is giving me a SQL error. Everything was find before then. It's probably because they updated the MariaDB (MySQL)... Any help is greatly appreciated!
Piwigo version: 2.9.2
PHP version: 7.1.10
MySQL version: 10.2.9
Here's what I get on my browser:
------------------------------------------------------------------------------------
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'recursive,
create_subcategories,
nb_photos,
storage
FROM piwigo_co' at line 6
SELECT
id,
type,
category_id,
user_album,
recursive,
create_subcategories,
nb_photos,
storage
FROM piwigo_community_permissions
WHERE (type = 'any_visitor')
; in /usr/local/photos/include/dblayer/functions_mysqli.inc.php on line 845
Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in /usr/local/photos/include/dblayer/functions_mysqli.inc.php:226 Stack trace: #0 /usr/local/photos/plugins/community/include/functions_community.inc.php(102): pwg_db_fetch_assoc(false) #1 /usr/local/photos/plugins/community/main.inc.php(48): community_get_user_permissions('2') #2 /usr/local/photos/include/functions_plugins.inc.php(279): community_init() #3 /usr/local/photos/include/common.inc.php(308): trigger_notify('init') #4 /usr/local/photos/index.php(26): include_once('/usr/local/phot...') #5 {main} thrown in /usr/local/photos/include/dblayer/functions_mysqli.inc.php on line 226
Offline
Playing around in phpMyAdmin I took out the 'recursive' field and the SQl query works. Apparently, MariaDB introduced this as a reserved word in Ver. 10.2.2 as indicated here: https://mariadb.com/kb/en/library/recur … overview/. So maybe somebody can change the name of the field along with the corresponding PHP code that calls it?
Offline