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.
system information - class version : 0.28 - GD version : 2.0.34 ... determining MIME type - Checking MIME type with Fileinfo PECL extension Fileinfo PECL extension not available - Checking MIME type with UNIX file() command UNIX file() command not availabled - Checking MIME type with mime.magic file (mime_content_type()) mime_content_type() is not available - Checking MIME type with getimagesize() getimagesize() failed - MIME type detected as image/png by browser - can't retrieve image information. open_basedir restriction in place?
...
process file to ../upload/\ - file size OK - file mime OK : image/png - no image properties available, can't enforce dimension checks : image/png - new file name ext : jpg - file name safe format - destination variables file_dst_path : ../upload/\ file_dst_name_body : _video file_dst_name_ext : jpg - image operation, change extension for conversion type - checking for auto_rename auto_rename to _video_1.jpg - destination file details file_dst_name : _video_1.jpg file_dst_pathname : ../upload/\_video_1.jpg - _video_1.jpg doesn't exist already - the file is not an image! - no image processing wanted - process OK
system information
- class version : 0.28
- GD version : 2.0.34
...
determining MIME type
- Checking MIME type with Fileinfo PECL extension
Fileinfo PECL extension not available
- Checking MIME type with UNIX file() command
UNIX file() command not availabled
- Checking MIME type with mime.magic file (mime_content_type())
mime_content_type() is not available
- Checking MIME type with getimagesize()
getimagesize() failed
- MIME type detected as image/png by browser
- can't retrieve image information. open_basedir restriction in place?
...
process file to ../upload/\
- file size OK
- file mime OK : image/png
- no image properties available, can't enforce dimension checks : image/png
- new file name ext : jpg
- file name safe format
- destination variables
file_dst_path : ../upload/\
file_dst_name_body : _video
file_dst_name_ext : jpg
- image operation, change extension for conversion type
- checking for auto_rename
auto_rename to _video_1.jpg
- destination file details
file_dst_name : _video_1.jpg
file_dst_pathname : ../upload/\_video_1.jpg
- _video_1.jpg doesn't exist already
- the file is not an image!
- no image processing wanted
- process OK
MIME type is not defined
may be something with the settings?
Your system is unable to find out the MIME type of the file, so it cannot block a malicious file. Besides, you may have open_basedir enabled.