Reply to Large images : upload works, resize not

Large images : upload works, resize not new!
by Rene, 11 years, 10 months ago
Hello,

I have some problem with the upload class.
Uploading and resize goes great. But when i have larger images to upload, for example 4MB, i got a blank page. Also $handle->log dont give than any information.

I already have set the limits to 40MB. But no positive result.
My code is :
$handle = new upload($_FILES['image'], 'nl_NL');
if ($handle->uploaded) {
  $handle->file_new_name_body      = "new_name"; 
  $handle->image_resize        = true;
  $handle->image_ratio        = true;
  $handle->image_x          = 800;
  $handle->image_y          = 600;
  $handle->process('../uploads/pages/images/large');
  
  if ($handle->processed) {
    echo 'image resized';
    $handle->clean();
  } else {
    echo 'error : ' . $handle->error;
  }

  echo $handle->log;
}

The script will work also with larger images, when i uncomment these rows :
//$handle->image_resize        = true;
//$handle->image_ratio        = true;
//$handle->image_x          = 800;
//$handle->image_y          = 600;

Then my log will work, and i see this log :

image resizedsystem information
- class version : 0.31
- operating system : Linux
- PHP version : 5.2.13
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 40M (41943040 bytes)
- language : nl_NL
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
Fileinfo PECL extension not available
- Checking MIME type with UNIX file() command
MIME type detected as image/jpeg by UNIX file() command
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : DSC01130.JPG
file_src_name_body : DSC01130
file_src_name_ext : jpg
file_src_pathname : /tmp/phpvVvkZV
file_src_mime : image/jpeg
file_src_size : 4855489 (max= 41943040)
file_src_error : 0
- source file is an image
image_src_x : 3648
image_src_y : 2736
image_src_pixels : 9980928
image_src_type : jpg
image_src_bits : 8
process file to ../uploads/pages/images/large/
- file size OK
- file mime OK : image/jpeg
- new file name body : 33_20130109112320
- file name safe format
- destination variables
file_dst_path : ../uploads/pages/images/large/
file_dst_name_body : 33_20130109112320
file_dst_name_ext : jpg
- checking for auto_rename
- destination file details
file_dst_name : 33_20130109112320.jpg
file_dst_pathname : ../uploads/pages/images/large/new_name.jpg
- new_name.jpg doesn't exist already
- no image processing wanted
- process OK
cleanup
- delete temp file /tmp/phpvVvkZV
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important