I have a strange kind of problem with error debugging utility. When i enabled the Debug Error Logging Utility for debugging, some files in /cache folder as as expected (small size), but others have a very large size (around 1.5GB each). This has probably something to do with the image manipulation class that we are using. But not sure why some uploads are okay, and others generate this BIG file. Image files upload so far are of a max 6MB.
Any help would be appreciated.
Regards
Farhan Sabir
(Attached Image)
Top few lines from "head myDEBUG-1279693042.log":
[21-Jul-2010 02:17:22] PHP Warning: Division by zero in /var/www/vhosts/<sitename>.com/httpdocs/includes/classes/image_manipulator.php on line 73
[21-Jul-2010 02:17:22] PHP Warning: fopen(images/uploads/framedImage481559.jpg) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 127
[21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
[21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
[21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
[21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
[21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
[21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
[21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
[21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
The image updater lines 127-134 are:
image_manipulator.php on line 69-77:PHP Code:$hndl = fopen($outputImage, "r");
$isize=sizeof($outputImage);
$imgdata="";
while(!feof($hndl)){
$imgdata.=fread($hndl,$isize);
};
header("Content-type: $contenttype");
echo $imgdata;
PHP Code:function pictureResizer($inputImage, $inputImageHeightInInch, $inputImageWidthInInch, $outputImage, $pxWidth, $pxHeight)
{
if ($pxHeight==0) {
$dim=$this->getXYDimensions($inputImage);
$pxHeight=$dim[0]*$pxWidth/$dim[1];
}
shell_exec("/usr/local/bin/convert ".$inputImage." -resize ".$pxWidth."x".$pxHeight."! ".$outputImage." ");
}



