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.
Hello, When I run phpinfo(), I see the upload_max_filesize and post_max_size is 20M. When I put a customized php.ini in root and change the parameteres
upload_max_filesize = 1M post_max_size = 1M
it makes no difference. When run phpinfo() after this, I still see 20M.
What should I do to change every uploaded images that greater than 1M exactly to 1Mb? I tried changing some parameters like $handle->image_max_width, $handle->image_max_height, $handle->image_max_pixels but I could only decrease the size a little (for example 5 M file to 2 MB).
Another way I tried is that in class.upload.php I changed the line $this->file_max_size = $val; to $this->file_max_size = 1048576;
It only uploads images that equals or smaller than 1 MB. If the image is greater than 1 MB, upload process doesn't work normally. I can use the script like this but I will always have to resize the images manually before upload.
When I run phpinfo(), I see the upload_max_filesize and post_max_size is 20M. When I put a customized php.ini in root and change the parameteres
upload_max_filesize = 1M
post_max_size = 1M
it makes no difference. When run phpinfo() after this, I still see 20M.
What should I do to change every uploaded images that greater than 1M exactly to 1Mb? I tried changing some parameters like $handle->image_max_width, $handle->image_max_height, $handle->image_max_pixels but I could only decrease the size a little (for example 5 M file to 2 MB).
Another way I tried is that in class.upload.php I changed the line
$this->file_max_size = $val; to $this->file_max_size = 1048576;
It only uploads images that equals or smaller than 1 MB. If the image is greater than 1 MB, upload process doesn't work normally. I can use the script like this but I will always have to resize the images manually before upload.
Thank you for your help.