ID: 36726 User updated by: christoph at ziegenberg dot com Reported By: christoph at ziegenberg dot com -Status: Bogus +Status: Open Bug Type: GD related Operating System: Suse Linux 9.3 PHP Version: 5.1.2 Assigned To: pajoye New Comment:
Thanks, got the reason... error_reporting was active, but display_errors wasn't and the error has not been logged. I changed it and got the following error for image 18925.jpg: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1600 bytes) I didn't expect that PHP needs so much memory for an image less than 200 KB - and I do NOT think that this is a normal behaviour, because there are much larger images (e.g. the new test image "99992.jpg" with about 1.5 MB) which work fine with the recommended value 8M... Changing it to 16M works for all images. I think that this error should not occur for the mentioned example image and that there is an error with the image processing wasting all the memory. So I changed this bug again to open... hope you agree. Previous Comments: ------------------------------------------------------------------------ [2006-03-20 21:05:35] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php 21839.jpg: Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 121 extraneous bytes before marker 0xd9 7737.jpg: Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 135 extraneous bytes before marker 0xd9 These two jpeg images are not valid. From php 5.1.3 (try using snapshot.php.net 5.1.x), you can ignore the warnings or minor errors using this command: ini_set("gd.jpeg_ignore_warning", true); I set to "expected behavior". By the way, you should use error_reporting(E_ALL); when you develop. ------------------------------------------------------------------------ [2006-03-20 20:16:28] christoph at ziegenberg dot com Download it here: http://www.ziegenberg.com/jpegbug/images.zip Maybe the setup is the problem, but 99% of the uploaded images work fine. Nevertheless you should get an error you can work with... ------------------------------------------------------------------------ [2006-03-20 19:42:57] [EMAIL PROTECTED] Sorry, can you provide me *one* archive with all the images inside? FYI, I tried "11848.jpg" and it works well. I feel like your system is broken or you are doing something wrong in your setup. ------------------------------------------------------------------------ [2006-03-20 19:33:55] christoph at ziegenberg dot com I added the following images: 21839.jpg, 21494.jpg, 7737.jpg, 22086.jpg, 11848.jpg You can see the GD information on the main page (gd_info() output), but now you will also see the output from the phpinfo() (filtered to not publish more information than needed). "cannot be opened by imagecreatefromjpeg" means that the function imagecreatefromjpeg() will return an empty string and create an error for some of the new image - try it and you'll see what I mean. This is what I expect for the first uploaded images if there is something wrong with the format (although I don't know what this is for the example images)... ------------------------------------------------------------------------ [2006-03-20 18:58:12] [EMAIL PROTECTED] Sorry I do not trace your changes :) which files did you add? Cannot be opened by imagecreatefromjpeg? What does that mean? It crashes or you have an error message? The phpinfo you provide is useless as it does not show the GD informations... ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/36726 -- Edit this bug report at http://bugs.php.net/?id=36726&edit=1