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.
and log: system information - class version : 0.28 - GD version : 2.0.34 - supported image types : png jpg gif bmp - open_basedir : /home/true/data:. - language : ru_RU 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 returned as audio/x-mod MIME type detected as audio/x-mod by UNIX file() command source variables - You can use all these before calling process() file_src_name : a_63e923d5.jpg file_src_name_body : a_63e923d5 file_src_name_ext : jpg file_src_pathname : /home/true/data/tmp/phppyCdum file_src_mime : audio/x-mod file_src_size : 7723 (max= 7340032) file_src_error : 0 process file to ../uploads/ - file size OK - file mime OK : audio/x-mod - new file name body : full_1254695015 - file name safe format - destination variables file_dst_path : ../uploads/ file_dst_name_body : full_1254695015 file_dst_name_ext : jpg - no image operation, keep extension - checking for auto_rename - destination file details file_dst_name : full_1254695015.jpg file_dst_pathname : ../uploads/full_1254695015.jpg - full_1254695015.jpg doesn't exist already - no image processing wanted - process OK process file to ../uploads/ - file size OK - file mime OK : audio/x-mod - new file name body : thumb_1254695015 - file name safe format - destination variables file_dst_path : ../uploads/ file_dst_name_body : thumb_1254695015 file_dst_name_ext : jpg - no image operation, keep extension - checking for auto_rename - destination file details file_dst_name : thumb_1254695015.jpg file_dst_pathname : ../uploads/thumb_1254695015.jpg - thumb_1254695015.jpg doesn't exist already - no image processing wanted - process OKReply
and log:
system information
- class version : 0.28
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : /home/true/data:.
- language : ru_RU
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 returned as audio/x-mod
MIME type detected as audio/x-mod by UNIX file() command
source variables
- You can use all these before calling process()
file_src_name : a_63e923d5.jpg
file_src_name_body : a_63e923d5
file_src_name_ext : jpg
file_src_pathname : /home/true/data/tmp/phppyCdum
file_src_mime : audio/x-mod
file_src_size : 7723 (max= 7340032)
file_src_error : 0
process file to ../uploads/
- file size OK
- file mime OK : audio/x-mod
- new file name body : full_1254695015
- file name safe format
- destination variables
file_dst_path : ../uploads/
file_dst_name_body : full_1254695015
file_dst_name_ext : jpg
- no image operation, keep extension
- checking for auto_rename
- destination file details
file_dst_name : full_1254695015.jpg
file_dst_pathname : ../uploads/full_1254695015.jpg
- full_1254695015.jpg doesn't exist already
- no image processing wanted
- process OK
process file to ../uploads/
- file size OK
- file mime OK : audio/x-mod
- new file name body : thumb_1254695015
- file name safe format
- destination variables
file_dst_path : ../uploads/
file_dst_name_body : thumb_1254695015
file_dst_name_ext : jpg
- no image operation, keep extension
- checking for auto_rename
- destination file details
file_dst_name : thumb_1254695015.jpg
file_dst_pathname : ../uploads/thumb_1254695015.jpg
- thumb_1254695015.jpg doesn't exist already
- no image processing wanted
- process OK