php.exe makes sometimes a crash when I try to execute this script

From: Date: Fri, 08 Sep 2000 09:10:43 +0000
Subject: php.exe makes sometimes a crash when I try to execute this script
Groups: php.windows 
Request: Send a blank email to php-windows+get-2525@lists.php.net to get a copy of this message
If I try to execute this script, php.exe will sometimes crash. On my computer, if I let $size on 150, it will sometimes crash, if I make it 100 or lower, it will always crash and if I make it bigger, everything works fine. I guess it have somthing to do with the available memory for php or with the available temporary file Or is php very unstable? I use win2k, apache and the php 4.02 from http://php4win.de (CGI) Greetings, Eric Wijngaards <?php header("Content-type: image/jpeg"); if ($size == "") $size=150; if ($file == "") $file = "image"; $tn_size = $size; $im = ImageCreateFromJPEG ($file.".jpg"); $im_x=floor(imagesx($im)); $im_y=floor(imagesy($im)); if ($im_x > $im_y) { $tn_x=floor($tn_size); $tn_y=floor($tn_size * $im_y / $im_x); } else { $tn_x=floor($tn_size * $im_x / $im_y); $tn_y=floor($tn_size); } $tn = ImageCreate ($tn_x,$tn_y); imagecopyresized($tn,$im,0,0,0,0,$tn_x,$tn_y,$im_x,$im_y); imagejpeg($tn); ImageDestroy($tn); Imagedestroy($im); ?>

« previous php.windows (#2525) next »