rendered paste bodyWarning (2): fread() [function.fread]: Length parameter must be greater than 0 [CORE\app\controllers\images_controller.php, line 60]
$this->layout = 'blank';
if (!empty($this->params['form']) && is_uploaded_file($this->params['form']['image']['tmp_name']))
{
$fileData = fread(fopen($this->params['form']['image']['tmp_name'], "r"), $this->params['form']['image']['size']);
$this->params['form']['image']['data'] = $fileData;
fread - [internal], line ??
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 60
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: [CORE\app\controllers\components\image_resize.php, line 9]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
function resize_img($imgname,$size)
{
//Header("Content-Type: image/jpeg");
$img_src = ImageCreateFromjpeg ($imgname);
$true_width = imagesx($img_src);
imagecreatefromjpeg - [internal], line ??
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 9
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'c:/WAMP/tmp\php1619.tmp' is not a valid JPEG file [CORE\app\controllers\components\image_resize.php, line 9]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
function resize_img($imgname,$size)
{
//Header("Content-Type: image/jpeg");
$img_src = ImageCreateFromjpeg ($imgname);
$true_width = imagesx($img_src);
imagecreatefromjpeg - [internal], line ??
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 9
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagesx(): supplied argument is not a valid Image resource [CORE\app\controllers\components\image_resize.php, line 10]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
$img_src = false
{
//Header("Content-Type: image/jpeg");
$img_src = ImageCreateFromjpeg ($imgname);
$true_width = imagesx($img_src);
$true_height = imagesy($img_src);
imagesx - [internal], line ??
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 10
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagesy(): supplied argument is not a valid Image resource [CORE\app\controllers\components\image_resize.php, line 11]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
$img_src = false
$true_width = false
//Header("Content-Type: image/jpeg");
$img_src = ImageCreateFromjpeg ($imgname);
$true_width = imagesx($img_src);
$true_height = imagesy($img_src);
if ($true_width>=$true_height)
imagesy - [internal], line ??
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 11
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): Division by zero [CORE\app\controllers\components\image_resize.php, line 15]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
$img_src = false
$true_width = false
$true_height = false
$height = 74
if ($true_width>=$true_height)
{
$height=$size;
$width = ($height/$true_height)*$true_width;
}
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 15
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions [CORE\app\controllers\components\image_resize.php, line 26]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
$img_src = false
$true_width = false
$true_height = false
$height = 74
$width = 0
//$height = ($width/$true_width)*$true_height;
// $width = ($height/$true_height)*$true_width;
}
$img_des = ImageCreateTrueColor($width,$height);
imagecopyresampled ($img_des, $img_src, 0, 0, 0, 0, $width, $height, $true_width, $true_height);
imagecreatetruecolor - [internal], line ??
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 26
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagecopyresampled(): supplied argument is not a valid Image resource [CORE\app\controllers\components\image_resize.php, line 27]
Context | Code
$imgname = "c:/WAMP/tmp\php1619.tmp"
$size = 74
$img_src = false
$true_width = false
$true_height = false
$height = 74
$width = 0
$img_des = false
// $width = ($height/$true_height)*$true_width;
}
$img_des = ImageCreateTrueColor($width,$height);
imagecopyresampled ($img_des, $img_src, 0, 0, 0, 0, $width, $height, $true_width, $true_height);
return $img_des;
imagecopyresampled - [internal], line ??
ImageResizeComponent::resize_img() - CORE\app\controllers\components\image_resize.php, line 27
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 80
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): imagejpeg(): supplied argument is not a valid Image resource [CORE\app\controllers\images_controller.php, line 81]
Context | Code
$fileData = false
$fileExt = "jpg"
$x = false
$sw = null
$sh = null
$newHeight = 74
$Thumbnail = false
}
$Thumbnail = $this->ImageResize->resize_img($this->params['form']['image']['tmp_name'], $newHeight); //here resizing
imagejpeg($Thumbnail,sprintf('/app/tmp/%s', $this->params['form']['image']['name']),80);
$fileData = addslashes(fread(fopen('/app/tmp/'.$this->params['form']['image']['name'], "r"), filesize('/app/tmp/'.$this->params['form']['image']['name'])));
imagejpeg - [internal], line ??
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 81
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): fopen(/app/tmp/corks.jpg) [function.fopen]: failed to open stream: No such file or directory [CORE\app\controllers\images_controller.php, line 82]
Context | Code
$fileData = false
$fileExt = "jpg"
$x = false
$sw = null
$sh = null
$newHeight = 74
$Thumbnail = false
$Thumbnail = $this->ImageResize->resize_img($this->params['form']['image']['tmp_name'], $newHeight); //here resizing
imagejpeg($Thumbnail,sprintf('/app/tmp/%s', $this->params['form']['image']['name']),80);
$fileData = addslashes(fread(fopen('/app/tmp/'.$this->params['form']['image']['name'], "r"), filesize('/app/tmp/'.$this->params['form']['image']['name'])));
fopen - [internal], line ??
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 82
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): filesize() [function.filesize]: stat failed for /app/tmp/corks.jpg [CORE\app\controllers\images_controller.php, line 82]
Context | Code
$fileData = false
$fileExt = "jpg"
$x = false
$sw = null
$sh = null
$newHeight = 74
$Thumbnail = false
$Thumbnail = $this->ImageResize->resize_img($this->params['form']['image']['tmp_name'], $newHeight); //here resizing
imagejpeg($Thumbnail,sprintf('/app/tmp/%s', $this->params['form']['image']['name']),80);
$fileData = addslashes(fread(fopen('/app/tmp/'.$this->params['form']['image']['name'], "r"), filesize('/app/tmp/'.$this->params['form']['image']['name'])));
filesize - [internal], line ??
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 82
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Warning (2): fread(): supplied argument is not a valid stream resource [CORE\app\controllers\images_controller.php, line 82]
Context | Code
$fileData = false
$fileExt = "jpg"
$x = false
$sw = null
$sh = null
$newHeight = 74
$Thumbnail = false
$Thumbnail = $this->ImageResize->resize_img($this->params['form']['image']['tmp_name'], $newHeight); //here resizing
imagejpeg($Thumbnail,sprintf('/app/tmp/%s', $this->params['form']['image']['name']),80);
$fileData = addslashes(fread(fopen('/app/tmp/'.$this->params['form']['image']['name'], "r"), filesize('/app/tmp/'.$this->params['form']['image']['name'])));
fread - [internal], line ??
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 82
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
ahgahdgdsgsdgsdgssINSERT INTO `thumbs` (image_id, data, type) VALUES ('113', '', 'jpg')
Warning (2): unlink(/app/tmp/corks.jpg) [function.unlink]: No such file or directory [CORE\app\controllers\images_controller.php, line 88]
Context | Code
$fileData = ""
$fileExt = "jpg"
$x = false
$sw = null
$sh = null
$newHeight = 74
$Thumbnail = false
$this->Image->uploadThumb($this->thumbnailID, $fileData, $fileExt);
unlink(sprintf('/app/tmp/%s', $this->params['form']['image']['name']));
unlink - [internal], line ??
ImagesController::upload() - CORE\app\controllers\images_controller.php, line 88
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 353
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 333
[main] - CORE\app\webroot\index.php, line 83
Select File