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.
[root@vps 2]# php -i | grep memory memory_limit => 128M => 128M Collecting memory statistics => No opcache.memory_consumption => 128 => 128 opcache.preferred_memory_model => no value => no value opcache.protect_memory => 0 => 0
Log File:
system information - class version : 0.33dev - operating system : Linux - PHP version : 7.0.6 - GD version : GD not present - supported image types : none - open_basedir : no restriction - upload_max_filesize : 2M (2097152 bytes) - language : en_GB source is an uploaded file - upload OK - file name OK determining MIME type - Fileinfo PECL extension deactivated - 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 image/png by mime_content_type() - MIME validated as image/png source variables - You can use all these before calling process() file_src_name : images.png file_src_name_body : images file_src_name_ext : png file_src_pathname : /tmp/phpALfJTC file_src_mime : image/png file_src_size : 8298 (max= 2097152) file_src_error : 0 process file to /var/www/uploads/2/ - file size OK - file mime OK : image/png - new file name body : profile - file name safe format - destination variables file_dst_path : /var/www/uploads/2/ file_dst_name_body : profile file_dst_name_ext : png - no auto_rename if same filename exists - destination file details file_dst_name : profile.png file_dst_pathname : /var/www/uploads/2/profile.png - no overwrite checking - no image processing wanted - process OK process file to /var/www/uploads/2/ - file size OK - file mime OK : image/png - new file name body : profile_thumbnail - file name safe format - destination variables file_dst_path : /var/www/uploads/2/ file_dst_name_body : profile_thumbnail file_dst_name_ext : png - no auto_rename if same filename exists - destination file details file_dst_name : profile_thumbnail.png file_dst_pathname : /var/www/uploads/2/profile_thumbnail.png - no overwrite checking - no image processing wanted - process OK cleanup - delete temp file /tmp/phpALfJTCReply
memory_limit => 128M => 128M
Collecting memory statistics => No
opcache.memory_consumption => 128 => 128
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
Log File:
system information
- class version : 0.33dev
- operating system : Linux
- PHP version : 7.0.6
- GD version : GD not present
- supported image types : none
- open_basedir : no restriction
- upload_max_filesize : 2M (2097152 bytes)
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Fileinfo PECL extension deactivated
- 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 image/png by mime_content_type()
- MIME validated as image/png
source variables
- You can use all these before calling process()
file_src_name : images.png
file_src_name_body : images
file_src_name_ext : png
file_src_pathname : /tmp/phpALfJTC
file_src_mime : image/png
file_src_size : 8298 (max= 2097152)
file_src_error : 0
process file to /var/www/uploads/2/
- file size OK
- file mime OK : image/png
- new file name body : profile
- file name safe format
- destination variables
file_dst_path : /var/www/uploads/2/
file_dst_name_body : profile
file_dst_name_ext : png
- no auto_rename if same filename exists
- destination file details
file_dst_name : profile.png
file_dst_pathname : /var/www/uploads/2/profile.png
- no overwrite checking
- no image processing wanted
- process OK
process file to /var/www/uploads/2/
- file size OK
- file mime OK : image/png
- new file name body : profile_thumbnail
- file name safe format
- destination variables
file_dst_path : /var/www/uploads/2/
file_dst_name_body : profile_thumbnail
file_dst_name_ext : png
- no auto_rename if same filename exists
- destination file details
file_dst_name : profile_thumbnail.png
file_dst_pathname : /var/www/uploads/2/profile_thumbnail.png
- no overwrite checking
- no image processing wanted
- process OK
cleanup
- delete temp file /tmp/phpALfJTC