No JPEG create support.

See all posts Reply

No JPEG create support. new!
by E. Erdem, 16 years, 2 months ago
Hi, I use your class in different parts of my site. Now one of them gives this error. Here is my script and upload log:

Script Parameters:
$uploaddir = FULL_PATH.'images/users/';
$upload = new upload($_FILES['profilepicture']);
$upload->allowed = array('image/jpeg','image/pjpeg','image/jpg','image/gif','image/png');
$upload->file_new_name_body = $username;
$upload->image_convert      = 'jpg';
$upload->jpeg_quality       = 80;
$upload->image_resize          = true;
$upload->image_ratio_fill      = true;
$upload->image_y               = 100;
$upload->image_x               = 100;
$upload->image_background_color = '#FFFFFF';
$upload->file_max_size = '204800';
$upload->file_overwrite = true;
$upload->file_auto_rename = false;
$upload->process($uploaddir);

Upload Log:
No JPEG create support.system information
- GD version : 2.0
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : tr_TR
source is an uploaded file
- upload OK
- file name OK
- source variables
file_src_name : 2280694464_63b050929d_o.jpg
file_src_name_body : 2280694464_63b050929d_o
file_src_name_ext : jpg
file_src_pathname : /tmp/phpZUuUG1
file_src_mime : image/jpeg
file_src_size : 25172 (max= 5242880)
file_src_error : 0
- source file is an image
image_src_x : 350
image_src_y : 324
image_src_pixels : 113400
image_src_type : jpg
image_src_bits : 8
process file to /home/eram/www/ogretmenlersitesi.com/images/users/
- file size OK
- file mime OK : image/jpeg
- new file name ext : jpg
- new file name body : admin
- file name safe format
- destination variables
file_dst_path : /home/eram/www/ogretmenlersitesi.com/images/users/
file_dst_name_body : admin
file_dst_name_ext : jpg
- image operation, change extension for conversion type
- no auto_rename if same filename exists
- destination file details
file_dst_name : admin.jpg
file_dst_pathname : /home/eram/www/ogretmenlersitesi.com/images/users/admin.jpg
- no overwrite checking
- image resizing or conversion wanted
- source image is JPEG
- resizing...
check x/y sizes
ratio_fill_y : -8 (-4;-4)
resized image object created
image_src_x y : 350 x 324
image_dst_x y : 100 x 92
- crop image : -4 0 -4 0
- converting...
fills in transparency with default color
- saving image...
Reply
Re: No JPEG create support. new!
by E. Erdem, 16 years, 2 months ago
I've read FAQ. There is no problem with dir permissions.Reply
Re: No JPEG create support. new!
by Mario, 12 years, 6 months ago
Hello, there is no problem here with directory permission as mentoned in FAQ but files permission.
I haved a same problem "No JPEG create support" and directory was set to 777. I have had file (image) inside that folder that class.upload was overwriting and that image didn't have the right permissions.
Image was chmod 644 but not apache (www-data) user and class.upload did not have privileges to overwrite it and returned "No JPEG create support" error.
And, simple and logic error but i have spend hours trying to figure this why.. (was thinking that something else was wrong) :) hope this helpsReply