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.28RC3 - GD version : 2.0.34 - supported image types : png jpg gif bmp - open_basedir : no restriction - language : se_SE 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 Fileinfo PECL extension failed (finfo_open) - 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() source variables - You can use all these before calling process() file_src_name : asd.JPG file_src_name_body : asd file_src_name_ext : jpg file_src_pathname : /tmp/phpt7OYmn file_src_mime : text/plain file_src_size : 17412 (max= 104857600) file_src_error : 0 process file to test/ - file size OK - script asd.JPG renamed as asd.JPG.txt! - file mime OK : text/plain - file name safe format - destination variables file_dst_path : test/ file_dst_name_body : asd file_dst_name_ext : jpg.txt - no image operation, keep extension - checking for auto_rename auto_rename to asd_1.jpg.txt - destination file details file_dst_name : asd_1.jpg.txt file_dst_pathname : test/asd_1.jpg.txt - asd_1.jpg.txt doesn't exist already - no image processing wanted - process OK cleanup - delete temp file /tmp/phpt7OYmnReply
I rent a server, could this be the problem? (from php info)
mime_magic mime_magic support invalid magic file, disabled
Directive Local Value Master Value mime_magic.debug Off Off mime_magic.magicfile /hsphere/local/config/httpd/mime.types /hsphere/local/config/httpd/mime.typesReply
I tried to deactivate the mine_magic (as I saw in the config that there is a way to check with "getimagesize") and then it works, seems like "getimagesize" can do the trick :)Reply
system information
- class version : 0.28RC3
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : se_SE
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
Fileinfo PECL extension failed (finfo_open)
- 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()
source variables
- You can use all these before calling process()
file_src_name : asd.JPG
file_src_name_body : asd
file_src_name_ext : jpg
file_src_pathname : /tmp/phpt7OYmn
file_src_mime : text/plain
file_src_size : 17412 (max= 104857600)
file_src_error : 0
process file to test/
- file size OK
- script asd.JPG renamed as asd.JPG.txt!
- file mime OK : text/plain
- file name safe format
- destination variables
file_dst_path : test/
file_dst_name_body : asd
file_dst_name_ext : jpg.txt
- no image operation, keep extension
- checking for auto_rename
auto_rename to asd_1.jpg.txt
- destination file details
file_dst_name : asd_1.jpg.txt
file_dst_pathname : test/asd_1.jpg.txt
- asd_1.jpg.txt doesn't exist already
- no image processing wanted
- process OK
cleanup
- delete temp file /tmp/phpt7OYmn
mime_magic
mime_magic support invalid magic file, disabled
Directive Local Value Master Value
mime_magic.debug Off Off
mime_magic.magicfile /hsphere/local/config/httpd/mime.types /hsphere/local/config/httpd/mime.types