Problem Uploading Some PNG files

georgeking6782

New Member
YetiShare User
Nov 6, 2017
6
0
1
Started getting an error when uploading PNG files although it is not a consistent behaviour. I can see server error 500 on chrome developer tools and the server error log is reporting:

[Tue Feb 11 13:48:54.004377 2020] [proxy_fcgi:error] [pid 20317:tid 140562560624384] [client xxx.xxx.xxx.xxx:39364] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Exception: Invalid image: /path/core/cache/plugins/imageviewer/_tmp/img-dff8c8db228728b1231fca326266e75f in /path/core/includes/image_resizer/SimpleImage.php:1113\nStack trace:\n#0 /path/core/includes/image_resizer/SimpleImage.php(535): SimpleImage->get_meta_data()\n#1 /path/core/includes/image_resizer/CustomSimpleImage.php(34): SimpleImage->load('/var/www/vhosts...')\n#2 /path/plugins/imageviewer/site/resize_image_inline.php(200): CustomSimpleImage->load_from_image_content(false)\n#3 {main}\n thrown in /path/core/includes/image_resizer/SimpleImage.php on line 1113\n'

Only started happening, JPG's always seem to upload OK no matter the filesize.

Recently started using AWS as the file uploads target but seem to now have this issue whether AWS is turned off or on - and as I said JPG's are fine so unlikely to be related?

Any suggestions?
Thanks
George
 

georgeking6782

New Member
YetiShare User
Nov 6, 2017
6
0
1
Update: Problem visible before upload starts (same issue with now with random JPGS). The images that will probably fail to upload have no thumbnail preview shown prior to hitting the upload button.

Observations:

- Upload of 20MB JPG file yesterday OK, today it failed.
- Upload of 2K PNG file yesterday failed, OK today.
- Upload of 124MB PNG file today OK so not a filesize issue.

Same error as above logged when fails occur.

Anyone got any suggestions?

Thanks
 

georgeking6782

New Member
YetiShare User
Nov 6, 2017
6
0
1
System Error Here:

2020-02-13 14:22:59 - *** ERROR *** ImagickException Object
(
[message:protected] => Empty input file `/path/files/_tmp/tmp-013873fecfc6e390a2cfb616465bde85.jpg' @ error/jpeg.c/JPEGErrorHandler/316
[string:Exception:private] =>
[code:protected] => 425
[file:protected] => /path/plugins/imageviewer/site/resize_image_inline.php
[line:protected] => 246
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /path/plugins/imageviewer/site/resize_image_inline.php
[line] => 246
[function] => __construct
[class] => Imagick
[type] => ->
[args] => Array
(
[0] => /path/files/_tmp/tmp-013873fecfc6e390a2cfb616465bde85.jpg
)

)

)

[previous:Exception:private] =>
)

Which relates to this :

// start Imagick
try
{
$imagick = new Imagick($tmpImageFile);
}
catch(Exception $e)
{
unlink($tmpImageFile);
log::eek:utputFormattedError((array) $e);
log::error(print_r($e, true));
exit;
}

When I monitor the /files/_tmp directory, the file "$tmpImageFile" has filesize of 0 bytes. Don't know why....

If I take the test image (9.1MB 6434 x 3217), open in Photoshop/Fireworks/Windows Photo APP, save as JPG, the re-saved JPG file will upload. The original file does upload without modification to the Yetishare demo site....