Problem with upload PNG images

See all posts See thread Reply

Re: Problem with upload PNG images new!
by sakiss, 13 years, 5 months ago
Hi

I am having the same problem in my application.
Your help is really appreciated.

This is my log:

- class version : 0.30
- operating system : Linux
- PHP version : 5.2.17
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 50M (52428800 bytes)
- language : en_GB
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
UNIX file() command failed
- Checking MIME type with mime.magic file (mime_content_type())
MIME type detected as text/plain by mime_content_type()
- MIME validated as text/plain
source variables
- You can use all these before calling process()
file_src_name : child.png
file_src_name_body : child
file_src_name_ext : png
file_src_pathname : /tmp/phpVxcgAL
file_src_mime : text/plain
file_src_size : 36177 (max= 52428800)
file_src_error : 0Reply
Re: Problem with upload PNG images new!
by colin, 13 years, 5 months ago
Your system's MIME detection tools are out of date or badly set up. mime_content_type should not return text/plain for an image.

If it is buggy, you can deactivate mime_content_type by setting mime_magic to false in the init() function:
$this->mime_magic               = false;
Reply