Publishing via Shotwell 0.22.0 fails with Piwigo 2.9.1 #705

Closed
opened 2026-10-05 00:12:48 +02:00 by adam · 3 comments
Owner

I'm using Shotwell 0.22.0 to upload images to a Piwigo 2.9.1 installation. The Shotwell application reports successful uploading of files, however, they never show up in the album that I uploaded them in.

The log/nginx/access.log contains:

192.168.1.100 - - [13/Sep/2017:05:37:17 -0500] "POST /ws.php HTTP/1.1" 200 345 "-" "-"

However, the log/nginx/error.log reveals the following:

2017/09/13 05:30:23 [error] 274#274: *166 FastCGI sent in stderr: "PHP message: PHP Warning:  md5_file(): Filename cannot be empty in /config/www/gallery/admin/include/functions_upload.inc.php on line 175
PHP message: PHP Warning:  getimagesize(): Filename cannot be empty in /config/www/gallery/admin/include/functions_upload.inc.php on line 226" while reading response header from upstream, client: 192.168.1.100, server: _, request: "POST /ws.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.123:8081"
I'm using Shotwell 0.22.0 to upload images to a Piwigo 2.9.1 installation. The Shotwell application reports successful uploading of files, however, they never show up in the album that I uploaded them in. The `log/nginx/access.log` contains: ``` 192.168.1.100 - - [13/Sep/2017:05:37:17 -0500] "POST /ws.php HTTP/1.1" 200 345 "-" "-" ``` However, the `log/nginx/error.log` reveals the following: ``` 2017/09/13 05:30:23 [error] 274#274: *166 FastCGI sent in stderr: "PHP message: PHP Warning: md5_file(): Filename cannot be empty in /config/www/gallery/admin/include/functions_upload.inc.php on line 175 PHP message: PHP Warning: getimagesize(): Filename cannot be empty in /config/www/gallery/admin/include/functions_upload.inc.php on line 226" while reading response header from upstream, client: 192.168.1.100, server: _, request: "POST /ws.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.123:8081" ``` <!-- github-sync-id:257334618 -->
adam closed this issue 2026-10-05 00:12:48 +02:00
Author
Owner

Upon investigation, I discovered that my uploaded photo file was larger than the upload_max_filesize in php.ini.

I figured this out by adding extra logging messages to get this:

[2017-09-13 19:35:25]   [DEBUG] ws_images_addSimple, array (                                                              
  'name' => 'P1050679.JPG',                                                                                               
  'type' => '',                                                                                                           
  'tmp_name' => '',                                                                                                       
  'error' => 1,                                                                                                           
  'size' => 0,                                                                                                            
)

When 'error' => 1 in the $_FILES variable it means that the file is larger than the limit, according to this Stack Overflow post. There are other error codes documented too.

Having some extra logging when this happens would save a lot of time when troubleshooting.

Upon investigation, I discovered that my uploaded photo file was larger than the `upload_max_filesize` in `php.ini`. I figured this out by adding extra logging messages to get this: ``` [2017-09-13 19:35:25] [DEBUG] ws_images_addSimple, array ( 'name' => 'P1050679.JPG', 'type' => '', 'tmp_name' => '', 'error' => 1, 'size' => 0, ) ``` When `'error' => 1` in the `$_FILES` variable it means that the file is larger than the limit, according to [this Stack Overflow post](https://stackoverflow.com/a/12003612/1591777). There are [other error codes documented](http://php.net/manual/en/features.file-upload.errors.php) too. Having some extra logging when this happens would save a lot of time when troubleshooting. <!-- github-comment-id:329290240 -->
Author
Owner

#768 adds better error logging.

#768 adds better error logging. <!-- github-comment-id:329429639 -->
Author
Owner

OK, I'm reviewing your pull-request :-)

OK, I'm reviewing your pull-request :-) <!-- github-comment-id:334459431 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#705