No GIF create support

See all posts Reply

No GIF create support new!
by djpasica, 13 years, 10 months ago
I use class.upload.php version 0.30
when i try to upload image, i have that error:
No GIF create support

CHMOD to upoaded directory is fine (777)

my script:
require('../incfiles/class.upload.php');
$name = $user_id.'_'.($kol+1);
$handle = new upload($_FILES['imagefile']);
if ($handle->uploaded) {
  $handle->file_new_name_body = $name;
  $handle->allowed =  $handle->allowed = array('image/jpeg','image/gif','image/png');
  $handle->file_max_size = 1024 * 50;
  $handle->file_overwrite = true;
  $handle->image_resize = true;
  $handle->image_x = 128;
  $handle->image_y = 128;
  $handle->image_convert = 'gif';
  $handle->process('../images/foto/');
  if ($handle->processed) {
    mysql_query("...");
    echo 'good';
  else echo ($handle->error);
  $handle->clean();
Reply
Re: No GIF create support new!
by djpasica, 13 years, 10 months ago
GD library is ONReply
Re: No GIF create support new!
by colin, 13 years, 10 months ago
Please output here the log produced by the classReply
Re: No GIF create support new!
by djpasica, 13 years, 10 months ago
Incorrect type of file.
system information
- class version : 0.30
- operating system : Linux
- PHP version : 5.1.6
- GD version : 2.0.28
- supported image types : png jpg gif bmp
- open_basedir : /home/djpasica/data:.
- upload_max_filesize : 100M (104857600 bytes)
- language : en_GB
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 application/x-zip by UNIX file() command
- MIME validated as application/x-zip
source variables
- You can use all these before calling process()
file_src_name : Zapis_ki.zip
file_src_name_body : Zapis_ki
file_src_name_ext : zip
file_src_pathname : /home/djpasica/data/mod-tmp/phpAY47Cq
file_src_mime : application/x-zip
file_src_size : 3220 (max= 104857600)
file_src_error : 0
process file to usersFile/
- file size OK
- error: Incorrect type of file.Reply
Re: No GIF create support new!
by djpasica, 13 years, 10 months ago
notice that regardless of the type of file will be error 'Incorrect type of file.'Reply
Re: No GIF create support new!
by colin, 13 years, 10 months ago
You are uploading a zip file:
file_src_name : Zapis_ki.zip

Your system detects the MIME type as application/x-zip:
MIME type detected as application/x-zip by UNIX file() command

But in your code, you allow only images:
$handle->allowed =  $handle->allowed = array('image/jpeg','image/gif','image/png');
Reply
Re: No GIF create support new!
by djpasica, 13 years, 10 months ago
i know that... i want to show you that i can`t upload nothing, regardless what type of file upload and what type of mime writeReply
Re: No GIF create support new!
by colin, 13 years, 10 months ago
Can you copy here an example of the log where it produces the error Incorrect type of file when it should not? In your previous log, the error message is normal.Reply