|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-01-30 13:06 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Package: FPM related
+Package: GD related
-Assigned To:
+Assigned To: cmb
[2018-01-30 13:06 UTC] cmb@php.net
[2018-01-30 16:40 UTC] grothentor at gmail dot com
[2018-01-30 17:03 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ documentation says that imagecreatefromstring function trows only E_WARNING lavel errors but if image is broken it throws fatal error. on local machine with apache2 + php (with same php version and Linux 4.4.0-53-generic) it works fine. (expected result copied from local machine). In differences of phpinfo() I found that on local machine GD library Version 2.2.5 and on server it has 2.2.3 version. but header versions are same and running apt-get install php7.1-gb says that "already up to date" p.s. i got that errors from ~7.1.9, mb earlier after update php on local machine it were fixed, but on server it doesn't help. Test script: --------------- <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $image = file_get_contents('http://novostoy.com.ua/files/obekti/974144_3.jpg'); $image = imagecreatefromstring($image); echo 'image processed'; Expected result: ---------------- Warning: imagecreatefromstring(): gd-jpeg: JPEG library reports unrecoverable error: Unsupported marker type 0x8e in index.php on line 7 Warning: imagecreatefromstring(): Passed data is not in 'JPEG' format in index.php on line 7 Warning: imagecreatefromstring(): Couldn't create GD Image Stream out of Data in index.php on line 7 image processed Actual result: -------------- Fatal error: imagecreatefromstring(): gd-jpeg: JPEG library reports unrecoverable error: Unsupported marker type 0x8e in index.php on line 7