Hello/Hi/Greetings,
Everything was working fine with my installation until I upgraded to Fedora 29. Seems most likely that the MySQL update broke things again Below the installation info is the error I receive from any gallery pages with photos. The admin pages all work fine.
Piwigo version: 2.9.4
PHP version: 7.2.12
MySQL version: 8.0.13
Piwigo URL: http://vw.homelinux.net/z
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 '' at line 16
SELECT
c.*,
user_representative_picture_id,
nb_images,
date_last,
max_date_last,
count_images,
nb_categories,
count_categories
FROM piwigo_categories c
INNER JOIN piwigo_user_cache_categories ucc
ON id = cat_id
AND user_id = 2
WHERE id_uppercat is NULL
ORDER BY rank in /data/www/piwigo/include/dblayer/functions_mysqli.inc.php on line 845
Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in /data/www/piwigo/include/dblayer/functions_mysqli.inc.php:226 Stack trace: #0 /data/www/piwigo/include/category_cats.inc.php(76): pwg_db_fetch_assoc(false) #1 /data/www/piwigo/index.php(318): include('/data/www/piwig...') #2 {main} thrown in /data/www/piwigo/include/dblayer/functions_mysqli.inc.php on line 226
Thanks for any advice / suggestions.
Last edited by rbr28 (2018-11-21 22:47:46)
Offline
This is likely due to the fact that 'rank' is reserved word in MySQL 8. See [Github] Piwigo issue #919 — I've submitted a patch for this, but it's not been merged https://github.com/Piwigo/Piwigo/pull/922
Offline
Thanks, I tried that but it didn't solve the problem and created others. It's very possible I just missed some places where rank was used, but it seemed that putting rank in the back quotes actually created another error. The changes in MySQL 8.x are definitely a problem for Piwigo. I ended up having to revert back to MySQL 5.x for now, as I just got tired of trying to resolve the issues.
Offline
I had the same problem after an upgrade to Fedora 29. I have created a docker container to run mysql 5.6 and then pointed the piwigo install at it. So far it's working fine. Another issue I found with the upgrade is that the php json package was not included - this caused some very obscure messages.
The following link provides good instructions on how to install a mysql container with docker
https://dev.mysql.com/doc/mysql-install … arted.html
Last edited by rp1428 (2018-11-28 14:04:06)
Offline