Image processing on local server won't behave

See all posts See thread Reply

Re: Image processing on local server won't behave new!
by Sean Vesce, 15 years, 1 month ago
Colin,

No luck.. See log below for a test to process an uploaded .JPG three times with the following variations on mime related parameters:

1) The first with -- $handle->mime_fileinfo = false;
2) The second with -- $handle->mime_check = false;
3) The third with -- $handle->mime_file = true;

Any further guidance is appreciated!

Sean

system information
- class version : 0.28
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
MAGIC path defaults to /usr/share/file/magic
MIME type detected as image/jpeg; charset=binary by Fileinfo PECL extension
source variables
- You can use all these before calling process()
file_src_name : CI-1641.jpg
file_src_name_body : CI-1641
file_src_name_ext : jpg
file_src_pathname : /Applications/XAMPP/xamppfiles/temp/phpehc7sr
file_src_mime : image/jpeg; charset=binary
file_src_size : 42701 (max= 134217728)
file_src_error : 0
process file to _imagetest/
- file size OK
- file mime OK : image/jpeg; charset=binary
- file name safe format
- destination variables
file_dst_path : _imagetest/
file_dst_name_body : CI_1641
file_dst_name_ext : jpg
- no image operation, keep extension
- checking for auto_rename
auto_rename to CI_1641_4.jpg
- destination file details
file_dst_name : CI_1641_4.jpg
file_dst_pathname : _imagetest/CI_1641_4.jpg
- CI_1641_4.jpg doesn't exist already
- no image processing wanted
- process OK
process file to _imagetest/
- file size OK
- file mime (not checked) : image/jpeg; charset=binary
- file name safe format
- destination variables
file_dst_path : _imagetest/
file_dst_name_body : CI_1641
file_dst_name_ext : jpg
- no image operation, keep extension
- checking for auto_rename
auto_rename to CI_1641_5.jpg
- destination file details
file_dst_name : CI_1641_5.jpg
file_dst_pathname : _imagetest/CI_1641_5.jpg
- CI_1641_5.jpg doesn't exist already
- no image processing wanted
- process OK
process file to _imagetest/
- file size OK
- file mime OK : image/jpeg; charset=binary
- file name safe format
- destination variables
file_dst_path : _imagetest/
file_dst_name_body : CI_1641
file_dst_name_ext : jpg
- no image operation, keep extension
- checking for auto_rename
auto_rename to CI_1641_6.jpg
- destination file details
file_dst_name : CI_1641_6.jpg
file_dst_pathname : _imagetest/CI_1641_6.jpg
- CI_1641_6.jpg doesn't exist already
- no image processing wanted
- process OK
cleanup
- delete temp file /Applications/XAMPP/xamppfiles/temp/phpehc7sr
Reply
Re: Image processing on local server won't behave new!
by colin, 15 years, 1 month ago
For some reason, your system returns the MIME type as image/jpeg; charset=binary.

I will issue a fix in the next version. Note that I am not supporting the class under Windows since I don't use it, and cannot test the class with it.

In the meantime, line 2607 in version 0.28, you can add the line:
$this->file_src_mime = str_replace('; charset=binary', '', $this->file_src_mime);
Reply
Re: Image processing on local server won't behave new!
by phprpap, 15 years ago
yea i think it come from snow leopard installation, i have the same issue over here.Reply