Image resize problem.

See all posts See thread Reply

Re: Image resize problem. new!
by Egor, 14 years, 6 months ago
I still could not solve this problem =(Reply
Re: Image resize problem. new!
by colin, 14 years, 6 months ago
As I say above, you have to check your server configuration. Your server reports audio/x-mod as a MIME type for a JPEG file, which is obviously wrong.

Try to deactivate MIME detection with the Unix file command:
$handle->mime_file = false;
Reply
Re: Image resize problem. new!
by Egor, 14 years, 6 months ago
$handle->mime_file = false; don`t help =(Reply
Re: Image resize problem. new!
by Egor, 14 years, 6 months ago
i`m write to my hosting support, but they say than "server config correct".Reply
Re: Image resize problem. new!
by Egor, 14 years, 6 months ago
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() function
Reply
Re: Image resize problem. new!
by colin, 14 years, 6 months ago
There may be a bug. I will check this out.Reply
Re: Image resize problem. new!
by Egor, 14 years, 6 months ago
thanks for your reply :)Reply