New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing via Shotwell 0.22.0 fails with Piwigo 2.9.1 #767

Closed
cstroe opened this Issue Sep 13, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@cstroe
Contributor

cstroe commented Sep 13, 2017

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"

@cstroe cstroe changed the title from Uploading via Shotwell 0.22.0 fails with Piwigo 2.9.1 to Publishing via Shotwell 0.22.0 fails with Piwigo 2.9.1 Sep 13, 2017

@cstroe

This comment has been minimized.

Contributor

cstroe commented Sep 13, 2017

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.

@cstroe

This comment has been minimized.

Contributor

cstroe commented Sep 14, 2017

#768 adds better error logging.

@plegall

This comment has been minimized.

Member

plegall commented Oct 5, 2017

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

@plegall plegall closed this Oct 5, 2017

plegall added a commit that referenced this issue Oct 5, 2017

Fixes #767 - Return a 500 HTTP status when a file upload error occurs. (
#768)

* Return a 500 HTTP status when a file upload error occurs.

plegall added a commit that referenced this issue Oct 5, 2017

@plegall plegall self-assigned this Oct 5, 2017

@plegall plegall added this to the 2.9.2 milestone Oct 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment