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.
i solved this problem. When i use $handle->mime_file = false; in this place:
$handle = new upload($_FILES['Filedata'], 'ru_RU');
$handle->mime_file = false; // (insert here)
if ($handle->uploaded) {
$handle->mime_file = false; // (or here)
Checking MIME type with UNIX file() command still work and not deactivated.
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
But when i change default variable in class file (line 1945) $this->mime_file = true; replace with $this->mime_file = false; - script work and image resizing
determining MIME type - Checking MIME type with Fileinfo PECL extension Fileinfo PECL extension not available - UNIX file() command is deactivated - Checking MIME type with mime.magic file (mime_content_type()) mime_content_type() is not available - Checking MIME type with getimagesize() MIME type detected as image/jpeg by PHP getimagesize() functionReply
Try to deactivate MIME detection with the Unix file command:
When i use $handle->mime_file = false; in this place:
Checking MIME type with UNIX file() command still work and not deactivated.
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
But when i change default variable in class file (line 1945) $this->mime_file = true; replace with $this->mime_file = false; - script work and image resizing
determining MIME type
- Checking MIME type with Fileinfo PECL extension
Fileinfo PECL extension not available
- UNIX file() command is deactivated
- Checking MIME type with mime.magic file (mime_content_type())
mime_content_type() is not available
- Checking MIME type with getimagesize()
MIME type detected as image/jpeg by PHP getimagesize() function