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.32 - operating system : Linux - PHP version : 7.3.14-1~deb10u1 - GD version : 2.2.5 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 20M (20971520 bytes) - language : tr_TR source is an uploaded file - upload OK - file name OK determining MIME type - Checking MIME type with Fileinfo PECL extension MAGIC path will not be used MIME type detected as image/jpeg; charset=binary by Fileinfo PECL extension - MIME validated as image/jpeg; source variables - You can use all these before calling process() file_src_name : girl-7.jpg file_src_name_body : girl-7 file_src_name_ext : jpg file_src_pathname : /tmp/phpSQ2YyN file_src_mime : image/jpeg; file_src_size : 27753 (max= 20971520) file_src_error : 0 process file to ../yemek/ - file size OK - file mime OK : image/jpeg; - file name safe format - destination variables file_dst_path : ../yemek/ file_dst_name_body : girl-7 file_dst_name_ext : jpg - no auto_rename if same filename exists - destination file details file_dst_name : girl-7.jpg file_dst_pathname : ../yemek/girl-7.jpg - no overwrite checking - no image processing wanted - process OK process file to ../yemek/kck/ - file size OK - file mime OK : image/jpeg; - file name safe format - destination variables file_dst_path : ../yemek/kck/ file_dst_name_body : girl-7 file_dst_name_ext : jpg - no auto_rename if same filename exists - destination file details file_dst_name : girl-7.jpg file_dst_pathname : ../yemek/kck/girl-7.jpg - no overwrite checking - no image processing wanted - process OK cleanup - delete temp file /tmp/phpSQ2YyNReply
There is something strange... Basically, the MIME is detected, and validated as image/jpeg; (note the semi-colon at the end). But because it has the semi-colon at the end, it is not recognized as an image MIME type, thus disabling image processing.
web hosting also works. It doesn't work on localhost. Uploading the image to its folder. But it does not apply scaling and water marker. php-7.0 -> I upgraded php7.3. It did not work after upgrading. php-7.0 was working normally.Reply
Thanks I installed the latest version $ upload = new \ Verot \ Upload \ Upload ($ _ FILES ['picture']); In this way, he worked in resize and watermark.Reply
Pardus-19.2 system
- class version : 0.32
- operating system : Linux
- PHP version : 7.3.14-1~deb10u1
- GD version : 2.2.5
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 20M (20971520 bytes)
- language : tr_TR
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
MAGIC path will not be used
MIME type detected as image/jpeg; charset=binary by Fileinfo PECL extension
- MIME validated as image/jpeg;
source variables
- You can use all these before calling process()
file_src_name : girl-7.jpg
file_src_name_body : girl-7
file_src_name_ext : jpg
file_src_pathname : /tmp/phpSQ2YyN
file_src_mime : image/jpeg;
file_src_size : 27753 (max= 20971520)
file_src_error : 0
process file to ../yemek/
- file size OK
- file mime OK : image/jpeg;
- file name safe format
- destination variables
file_dst_path : ../yemek/
file_dst_name_body : girl-7
file_dst_name_ext : jpg
- no auto_rename if same filename exists
- destination file details
file_dst_name : girl-7.jpg
file_dst_pathname : ../yemek/girl-7.jpg
- no overwrite checking
- no image processing wanted
- process OK
process file to ../yemek/kck/
- file size OK
- file mime OK : image/jpeg;
- file name safe format
- destination variables
file_dst_path : ../yemek/kck/
file_dst_name_body : girl-7
file_dst_name_ext : jpg
- no auto_rename if same filename exists
- destination file details
file_dst_name : girl-7.jpg
file_dst_pathname : ../yemek/kck/girl-7.jpg
- no overwrite checking
- no image processing wanted
- process OK
cleanup
- delete temp file /tmp/phpSQ2YyN
But the regex shouldn't return the semi-colon, see https://regex101.com/r/omnTR3/1
I also see that you are not using the latest version of the class. Please try again with the latest release, or the master branch.
It doesn't work on localhost.
Uploading the image to its folder.
But it does not apply scaling and water marker.
php-7.0 -> I upgraded php7.3.
It did not work after upgrading.
php-7.0 was working normally.
I installed the latest version
$ upload = new \ Verot \ Upload \ Upload ($ _ FILES ['picture']);
In this way, he worked in resize and watermark.
upload on old picture
how to do