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

From: Date: Tue, 12 Nov 2002 16:18:44 +0000
Subject: #20393 [Opn->Bgs]: ImageCreateFromJpeg with uncomplete jpeg -> Apache 2 hangs -> taking 99% CPU
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-24703@lists.php.net to get a copy of this message
ID: 20393 User updated by: tobias-jamin@gmx.de -Summary: createImageFromJpeg with uncomplete jpeg -> Apache 2 hangs -> taking 99% CPU Reported By: tobias-jamin@gmx.de -Status: Open +Status: Bogus Bug Type: *Graphics related Operating System: Windows XP Pro PHP Version: 4.2.3 New Comment: Error in summary. CreateImageFromJpeg must be ImageCreateFromJpeg Previous Comments: ------------------------------------------------------------------------ [2002-11-12 10:11:45] tobias-jamin@gmx.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 (#24703) next »