ID: 42656 Updated by: [email protected] Reported By: jeanpascal dot leandre at free dot fr -Status: No Feedback +Status: Feedback Bug Type: Reproducible crash Operating System: Windows server 2003 PHP Version: 5.2.4 Assigned To: pajoye New Comment:
Provide a link to the images causing issues then. Previous Comments: ------------------------------------------------------------------------ [2009-03-01 22:13:02] megazzt at gmail dot com I have a similar issue. When I try to load a very large image using imagecreatefrom*, script execution halts and any content that has not been flushed will not be sent to the user. There is more than enough memory to handle the image. I have reproduced this by creating a simple 5000x5000 transparent 24- bit PNG in Irfanview (PNG compression at maximum). I am using Windows XP SP3, PHP 5.2.8, Apache 2.2.11. No errors in the Apache error log. It was using the php5apache2 module (instead of the php5apache2_2 one) but changing it didn't affect my problem. ------------------------------------------------------------------------ [2008-08-18 12:33:47] dhanraj dot r at indianic dot com Your vote system is wrong one person can voted the more time in this system so how can u stop it ------------------------------------------------------------------------ [2007-09-21 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2007-09-13 12:03:52] [email protected] Nothing has been changed in imagecreatefromjpeg. Are you sure it crashes and it is not a memory_limit (be sure to have error_reporting and display errors On)? If yes, please try again with the memory_limit disabled. However, it looks like a memory limit problem. PHP's memory manager has been changed since 5.2.0. The reported memory usage is higher than in 5.2.0 (it does not use more but the reports/calculation is more accurate). If you still experiment the crash, please provide a link to an image you used. ------------------------------------------------------------------------ [2007-09-13 11:45:19] jeanpascal dot leandre at free dot fr Description: ------------ Imagecreatefromjpeg crash with large-sized pictures (ex 2 Megapixel 500KB) since php version 5.2.1. The probleme exists width php 5.2.3, 5.2.4 there, but did not exist php 5.2.0 there. The increase of memory allowed for php scripts do not solve the problem. If 8M memory is enough for a picture of 6 Megapixel width php 5.2.0, even 32M of memory is not enough for PHP 5.2.4 , because memory occupation of the server becomes then very very important(my server has only 2 GB DDR) The problem declared itself during the upgrade 5.2.1. It is thus necessary to see what took place during the programming of 5.2.1 Reproduce code: --------------- $conf = $_GET["conf"]; $fichier = $_GET["fichier"] ; include("sys/".$conf.".php"); $image = ImageCreateFromJPEG($fichier) ; $width = imagesx($image) ; $height = imagesy($image) ; $ratio = $width / $height ; $new_width = $widthThumb ; $new_height = $widthThumb / $ratio ; if ($new_height > $heightThumb) { $new_height = $heightThumb ; $new_width = $heightThumb * $ratio ; } $thumb = imagecreatetruecolor($new_width,$new_height) ; imagecopyresampled($thumb,$image,0,0,0,0,$new_width,$new_height,$width,$height) ; header("Content-type:image/jpeg") ; imagejpeg($thumb) ; imagedestroy($image) ; imagedestroy($thumb) ; Expected result: ---------------- This script work normally with the large-sized pictures of several megapixels from the new digital cameras Actual result: -------------- crash with large-sized pictures ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42656&edit=1
