#20393 [Com]: ImageCreateFromJpeg with uncomplete jpeg -> Apache 2 hangs -> taking 99% CPU

From: Date: Sat, 22 Mar 2003 19:56:07 +0000
Subject: #20393 [Com]: ImageCreateFromJpeg with uncomplete jpeg -> Apache 2 hangs -> taking 99% CPU
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36184@lists.php.net to get a copy of this message
ID: 20393 Comment by: fbn79 at libero dot it Reported By: tobias-jamin at gmx dot de Status: Bogus Bug Type: *Graphics related Operating System: Windows XP Pro PHP Version: 4.2.3 New Comment: I have the same problem whith php 4.3.0 apache2 on winxp pro e php 4.3.0 iis and winxp pro Previous Comments: ------------------------------------------------------------------------ [2002-11-12 10:18:43] tobias-jamin at gmx dot de Error in summary. CreateImageFromJpeg must be ImageCreateFromJpeg ------------------------------------------------------------------------ [2002-11-12 10:11:45] tobias-jamin at gmx dot de I call the function createImageFromJpeg like the documentation tells: ************* function myFunction($cImagefile) { $oImage = ImageCreateFromJpeg($cImagefile); if(!$oImage) // Error return false; else return true; } ************* I think $oImage will be invalid if $cImagefile is a uncomplete jpeg-file (the upload of the picture didn't finished) and my function will return false. But Apache 2 takes 99% of CPU and hangs. I have to stop the Apache 2 service and restart. The "error/problem" doesn't appear with a completely uploaded jpeg-file because ImageCreateFromJpeg returns a valid image-ressource ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20393&edit=1

« previous php.bugs (#36184) next »