Hello,
I am running a private piwigo gallery for sharing my pictures with my family and friends. I have it installed for well over five years by now, keep running it under the same provider and on the same site. I regularly install new updates.
Last week I've noticed a weird behavior on my gallery. It keeps randomly returning Unauthorized issues. pwg.images.upload or pwg.groups.getList ... refreshing the page several times temporarily helps until I get Unauthorizes again. Clearing the cache does not help, I get it on all my devices (including a smart phone) and all the browsers. Behavior is the same - random Unauthorized errors.
In order to try to resolve the issue I've upgraded to the latest piwigo version which is 16.4. I am using PHP 8.4 (but tried 7.4 and 8.3).
This issue is literally rendering my gallery unusable. I've checked all the forums and recent issues but seems nobody else is hitting this.
Any help appreciated.
Offline
Hi,
No clues in the logs?
Offline
Hi,
thanks for fast reaction.
Which logs do you mean? As far as I know, piwigo does not have a single centralized log file for all system errors. In the other logs there is no clue :/.
Offline
...what I reported, I got from the browser's console...
Offline
I understand but my first idea was to check /_data/logs to look after something surprising.
Offline
Hm...not sure if this is me trying to refresh the browser window or something actually useful...apart from that nothing suspicious :(:
[2026-05-17 21:09:44][exec=6ATS0ACrlN] [DEBUG] get_regular_search_results 0 items in $unsorted_items
[2026-05-17 21:10:48][exec=lcb0JOn953] [INFO] invalidate_user_cache called
[2026-05-17 21:11:21][exec=kcItudXkrU] [INFO] [getuserdata][exec_code=5184][user_id=2] needs user_cache to be rebuilt
[2026-05-17 21:11:21][exec=kcItudXkrU] [INFO] [generate_user_cache-u2][exec=b150b8a0] starts now
[2026-05-17 21:11:21][exec=kcItudXkrU] [INFO] [generate_user_cache-u2][exec=b150b8a0] wins the race and gets the token!
[2026-05-17 21:11:21][exec=kcItudXkrU] [INFO] [generate_user_cache-u2] ends now
[2026-05-17 21:11:21][exec=kcItudXkrU] [INFO] [getuserdata][exec_code=5184][user_id=2] user_cache generated, executed in 0.020 s
[2026-05-17 21:12:04][exec=uE2phd7tDa] [INFO] [getuserdata][exec_code=a5d4][user_id=5] needs user_cache to be rebuilt
[2026-05-17 21:12:04][exec=uE2phd7tDa] [INFO] [generate_user_cache-u5][exec=7b0b3ce0] starts now
[2026-05-17 21:12:04][exec=uE2phd7tDa] [INFO] [generate_user_cache-u5][exec=7b0b3ce0] wins the race and gets the token!
[2026-05-17 21:12:05][exec=uE2phd7tDa] [INFO] [generate_user_cache-u5] ends now
[2026-05-17 21:12:05][exec=uE2phd7tDa] [INFO] [getuserdata][exec_code=a5d4][user_id=5] user_cache generated, executed in 0.537 s
[2026-05-17 21:30:55][exec=rwtPpGDBGz] [INFO] [getuserdata][exec_code=f64d][user_id=16] needs user_cache to be rebuilt
[2026-05-17 21:30:55][exec=rwtPpGDBGz] [INFO] [generate_user_cache-u16][exec=91fbcfa9] starts now
[2026-05-17 21:30:55][exec=rwtPpGDBGz] [INFO] [generate_user_cache-u16][exec=91fbcfa9] wins the race and gets the token!
[2026-05-17 21:30:55][exec=rwtPpGDBGz] [INFO] [generate_user_cache-u16] ends now
[2026-05-17 21:30:55][exec=rwtPpGDBGz] [INFO] [getuserdata][exec_code=f64d][user_id=16] user_cache generated, executed in 0.727 s
Offline
I do agree: nothing useful amha. Sorry to not be of any help.
Offline
I've managed to upload one new picture, I see it in the gallery, but when I try to access it, I get:
Fatal error: Uncaught mysqli_sql_exception: 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 ')' at line 3 in /home/html/....../piwigo/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0
Last edited by zorek (2026-05-27 21:07:49)
Offline