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.
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 -->
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 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.logcontains:However, the
log/nginx/error.logreveals the following:Upon investigation, I discovered that my uploaded photo file was larger than the
upload_max_filesizeinphp.ini.I figured this out by adding extra logging messages to get this:
When
'error' => 1in the$_FILESvariable 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.
#768 adds better error logging.
OK, I'm reviewing your pull-request :-)