Upload, resize, crop works local, on server only upload

See all posts Reply

Upload, resize, crop works local, on server only upload new!
by Andre, 10 years ago
Im using the class and on my local machine it works but when I run it on the server it only uploads the image and doesnt rezise or crop it.
if ($upFoto -> uploaded) {
  $justFileName = removeAccents(preg_replace('/\s+/', '', strtolower($name)));
  $rand = rand(0, 99999999);
  $File_Name = preg_replace('/\s+/', '', strtolower($_FILES['inputFotoEdit']['name'])); 
  $File_Ext = substr($File_Name, strrpos($File_Name, '.'));
  $nmFoto = $rand.'_'.$justFileName.$File_Ext;
  $upFoto -> image_resize = TRUE;
  $upFoto -> file_new_name_body = $rand.'_'.$justFileName;
  $upFoto -> image_x = 140;
  $upFoto -> image_y = 140;
  $upFoto -> image_ratio_crop = TRUE;
  $upFoto -> file_safe_name = TRUE;
  $upFoto -> image_ratio = TRUE;
  $upFoto -> dir_auto_chmod = TRUE;
  $upFoto -> dir_chmod = 0777;
  $upFoto -> Process('../../pic/');
  $cm_img = $upFoto -> file_dst_name;
    echo $upFoto->log;                      
  if ($upFoto -> processed) {
    $isFotoUp = true;
  }

log from server:

system information
- class version : 0.31
- operating system : Linux
- PHP version : 5.4.4-14+deb7u12
- GD version : GD not present
- supported image types : none
- open_basedir : no restriction
- upload_max_filesize : 128M (134217728 bytes)
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
MAGIC path defaults to /usr/share/file/magic
MIME type detected as application/octet-stream; charset=binary by Fileinfo PECL extension
- MIME validated as application/octet-stream
- Flash may be rewriting MIME as application/octet-stream
- Try to guess MIME type from file extension (jpg): MIME type set to image/jpeg
source variables
- You can use all these before calling process()
file_src_name : WP_20141107_10_58_56_Raw2.jpg
file_src_name_body : WP_20141107_10_58_56_Raw2
file_src_name_ext : jpg
file_src_pathname : /tmp/phpqxubfy
file_src_mime : image/jpeg
file_src_size : 37203 (max= 134217728)
file_src_error : 0
process file to ../../pic/
- file size OK
- file mime OK : image/jpeg
- new file name body : 79083427_andresantosfreitas
- file name safe format
- destination variables
file_dst_path : ../../pic/
file_dst_name_body : 79083427_andresantosfreitas
file_dst_name_ext : jpg
- checking for auto_rename
- destination file details
file_dst_name : 79083427_andresantosfreitas.jpg
file_dst_pathname : ../../pic/79083427_andresantosfreitas.jpg
- 79083427_andresantosfreitas.jpg doesn't exist already
- no image processing wanted
- process OK
Reply
Re: Upload, resize, crop works local, on server only upload new!
by colin, 10 years ago
Please use the latest version of the class, in which this issue is fixed.Reply
Re: Upload, resize, crop works local, on server only upload new!
by Andre, 10 years ago
I was using the latest version already.
I found the problem...it was on my server it didnt have the GD module of php installed.
I just loaded up the module php5-gd and after the installation it solved my problem.Reply