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.30 - operating system : WINNT - PHP version : 5.3.5 - GD version : 2.0.34 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 99999999999999999M (1.048576E+23 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 not availabled - Checking MIME type with mime.magic file (mime_content_type()) mime_content_type() is not available - Checking MIME type with getimagesize() MIME type detected as image/jpeg by PHP getimagesize() function - MIME validated as image/jpeg source variables - You can use all these before calling process() file_src_name : nav-03.jpg file_src_name_body : nav-03 file_src_name_ext : jpg file_src_pathname : C:\wamp\tmp\php77A5.tmp file_src_mime : image/jpeg file_src_size : 5213 (max= 1.048576E+23) file_src_error : 0 - source file is an image image_src_x : 100 image_src_y : 100 image_src_pixels : 10000 image_src_type : jpg image_src_bits : 8 process file to panadol_content/files/uploads/\ - file size OK - file mime OK : image/jpeg - file name body prepend : 2011-11-12_ - file name safe format - destination variables file_dst_path : panadol_content/files/uploads/\ file_dst_name_body : 2011_11_12_nav_03 file_dst_name_ext : jpg - image operation, keep extension - checking for auto_rename - destination file details file_dst_name : 2011_11_12_nav_03.jpg file_dst_pathname : panadol_content/files/uploads/\2011_11_12_nav_03.jpg - 2011_11_12_nav_03.jpg doesn't exist already - image resizing or conversion wanted - source image is JPEG - setting destination file type to jpg - add text - converting... fills in transparency with default color - saving image... JPEG image created image objects destroyed - process OK process file to panadol_content/files/uploads/\ - file size OK - file mime OK : image/jpeg - file name body append : _th - file name body prepend : 2011-11-12_ - file name safe format - destination variables file_dst_path : panadol_content/files/uploads/\ file_dst_name_body : 2011_11_12_nav_03_th file_dst_name_ext : jpg - image operation, keep extension - checking for auto_rename - destination file details file_dst_name : 2011_11_12_nav_03_th.jpg file_dst_pathname : panadol_content/files/uploads/\2011_11_12_nav_03_th.jpg - 2011_11_12_nav_03_th.jpg doesn't exist already - image resizing or conversion wanted - source image is JPEG - setting destination file type to jpg - resizing... check x/y sizes ratio_crop_y : 0 (0;0) resized image object created image_src_x y : 100 x 100 image_dst_x y : 150 x 150 - crop image : 0 0 0 0 - converting... fills in transparency with default color - saving image... JPEG image created image objects destroyed - process OK
- class version : 0.30
- operating system : WINNT
- PHP version : 5.3.5
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 99999999999999999M (1.048576E+23 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 not availabled
- Checking MIME type with mime.magic file (mime_content_type())
mime_content_type() is not available
- Checking MIME type with getimagesize()
MIME type detected as image/jpeg by PHP getimagesize() function
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : nav-03.jpg
file_src_name_body : nav-03
file_src_name_ext : jpg
file_src_pathname : C:\wamp\tmp\php77A5.tmp
file_src_mime : image/jpeg
file_src_size : 5213 (max= 1.048576E+23)
file_src_error : 0
- source file is an image
image_src_x : 100
image_src_y : 100
image_src_pixels : 10000
image_src_type : jpg
image_src_bits : 8
process file to panadol_content/files/uploads/\
- file size OK
- file mime OK : image/jpeg
- file name body prepend : 2011-11-12_
- file name safe format
- destination variables
file_dst_path : panadol_content/files/uploads/\
file_dst_name_body : 2011_11_12_nav_03
file_dst_name_ext : jpg
- image operation, keep extension
- checking for auto_rename
- destination file details
file_dst_name : 2011_11_12_nav_03.jpg
file_dst_pathname : panadol_content/files/uploads/\2011_11_12_nav_03.jpg
- 2011_11_12_nav_03.jpg doesn't exist already
- image resizing or conversion wanted
- source image is JPEG
- setting destination file type to jpg
- add text
- converting...
fills in transparency with default color
- saving image...
JPEG image created
image objects destroyed
- process OK
process file to panadol_content/files/uploads/\
- file size OK
- file mime OK : image/jpeg
- file name body append : _th
- file name body prepend : 2011-11-12_
- file name safe format
- destination variables
file_dst_path : panadol_content/files/uploads/\
file_dst_name_body : 2011_11_12_nav_03_th
file_dst_name_ext : jpg
- image operation, keep extension
- checking for auto_rename
- destination file details
file_dst_name : 2011_11_12_nav_03_th.jpg
file_dst_pathname : panadol_content/files/uploads/\2011_11_12_nav_03_th.jpg
- 2011_11_12_nav_03_th.jpg doesn't exist already
- image resizing or conversion wanted
- source image is JPEG
- setting destination file type to jpg
- resizing...
check x/y sizes
ratio_crop_y : 0 (0;0)
resized image object created
image_src_x y : 100 x 100
image_dst_x y : 150 x 150
- crop image : 0 0 0 0
- converting...
fills in transparency with default color
- saving image...
JPEG image created
image objects destroyed
- process OK
Thank you for the good work.