class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
See all posts Reply
$new_name_thumb = generate_thumb($file, $ext, $media_dir, $new_name, 105, false, "_thumb", "jpg"); $file_chmod = $media_dir . "/" . $new_name_thumb; chmod ($file_chmod, 0777); $new_name_thumb = generate_thumb($file, $ext, $media_dir, $new_name, 593, true, "_thumb_big", "jpg"); $file_chmod = $media_dir . "/" . $new_name_thumb; chmod ($file_chmod, 0777);
Log says:
error : No JPEG read support
source is an uploaded file
- upload OK
- file name OK
- source variables
file_src_name : wintergarten_neu_zeitungsartikel_big.jpg
file_src_name_body : wintergarten_neu_zeitungsartikel_big
file_src_name_ext : jpg
file_src_pathname : /tmp/phpkJ1vcD
file_src_mime : image/jpeg
file_src_size : 67807 (max= 5242880)
file_src_error : 0
process file to /var/www/web25/html/media/news/6/
- file size OK
- file mime OK : image/jpeg
- new file name body : news_thumb
- file name safe format
- destination variables
file_dst_path : /var/www/web25/html/media/news/6/
file_dst_name_body : news_thumb
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 : news_thumb.jpg
file_dst_pathname : /var/www/web25/html/media/news/6/news_thumb.jpg
- no overwrite checking
- image resizing or conversion wanted
script are running well everywhere else
any idea?
found the solution: CHMOD(...)