Hello/Hi/Greetings,
Can't upload photos since update to v16 today.. Under admin user account. Turned off most plugins except the ones I use (listed below) and no change to behavior. The upload attempts just don't finish as they normally would and I have to select to leave the page... No errors.
I can then find the photo files I tried to upload in the recent photos batch manager (latest import filter) and can move them where I want, or other actions..
Piwigo 16.0.0 Check for upgrade
Installed on 23 November 2014, 11 years 1 day ago
Operating system: Linux (container)
PHP: 7.4.33 (Show info) [2025-11-25 19:14:20]
MySQL: 8.0.43-cll-lve [2025-11-25 13:14:20]
Graphics Library: External ImageMagick 6.9.13-25
Cache size 19636.11 MB right now Refresh
Activated plugin list 9
Admin Tools
Exif View
LocalFiles Editor
OpenStreetMap
PhotoSphere
Read Metadata
Smilies Support
Stop Spammers
Subscribe To Comments
Piwigo URL: https://www.tmphillips.com/pg/
Offline
when you're on the upload form, can you open the browser developer console? There you can find the "network" tab and you must see some requests to ws.php. I guess the last one is on pwg.images.uploadCompleted : click on it and search for response details.
Offline
There is no entry with pwg.images.uploadCompleted
There are two post entries for
https://www.tmphillips.com/pg/ws.php?me … ormat=json
Second one has this response:
Fatal error: Uncaught Error: Call to undefined function str_starts_with() in /home/briggcom/public_html/tmphillips/pg/admin/include/functions_metadata.php:195 Stack trace: #0 /home/briggcom/public_html/tmphillips/pg/admin/include/functions_metadata.php(292): get_sync_metadata(Array) #1 /home/briggcom/public_html/tmphillips/pg/admin/include/functions_upload.inc.php(403): sync_metadata(Array) #2 /home/briggcom/public_html/tmphillips/pg/include/ws_functions/pwg.images.php(1873): add_uploaded_file('./upload/buffer...', 'PA150081rg.jpg', Array, 0, 64446) #3 /home/briggcom/public_html/tmphillips/pg/include/ws_core.inc.php(605): ws_images_upload(Array, Object(PwgServer)) #4 /home/briggcom/public_html/tmphillips/pg/include/ws_protocols/rest_handler.php(41): PwgServer->invoke('pwg.images.uplo...', Array) #5 /home/briggcom/public_html/tmphillips/pg/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest(Object(PwgServer)) #6 /home/briggcom/public_html/tmphillips/pg/ws.php(22): PwgServer->run() #7 {main} thrown in /home/briggcom/public_html/tmphillips/pg/admin/include/functions_metadata.php on line 195
Offline
This is not an official answer from Piwigo. I'm just another user.
However I setup a test site with PHP 7.4.33 and I got the same behaviour that you reported.
The function reported in the error str_starts_with() was apparently added with PHP 8. If you are not able to switch your server PHP to a newer version of PHP I was also able to fix the problem with some code in the personal plugin (LocalFiles Editor, which I see you have on your list). If you use the personal plugin fix make sure to also activate the personal plugin on the plugins page.
I got this polyfill code from https://gist.github.com/juliyvchirkov/8 … 93a1a8b2ce
if (!function_exists('str_starts_with')) {
function str_starts_with(string $haystack, string $needle): bool
{
return strlen($needle) === 0 || strpos($haystack, $needle) === 0;
}
}Environment
Piwigo 16.0.0 Check for upgrade
Installed on November 25, 2025, 5 hours ago
Operating system: Linux (container)
PHP: 7.4.33 (Show info) [2025-11-26 03:21:52]
MySQL: 10.6.23-MariaDB-cll-lve [2025-11-25 22:21:52]
Graphics Library: External ImageMagick 6.9.13-25
Cache size N/A never calculated Refresh
Activated plugin list
LocalFiles Editor
Personal Plugin
Offline
Brilliant, that worked. Thanks @moberley!
In the past my host has not wanted to upgrade PHP.. I will ask them again since that was a long time ago..
Offline
Upgrade to 16.1 fixed this. I turned the workaround off and was able to upload just fine...
Last edited by todd (2025-12-03 20:14:30)
Offline