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.
I am currently hosting this at my own server since the domain doesn't exist yet. I think GoDaddy will have such options already turned up when I use them. However on my server when I add that line to the script, the page works fine until I click upload, and then I get a blank page. I've determined that the script dies right at the first
if ($handle->processed) {
( dunno if the BBS is going to work ) Any ideas?Reply
No. My PHP memory limit is set to "memory_limit = 128M" so I don't think that's the problem. Sorry to drag this out, but do you have any other ideas?Reply
I am getting no info errors in Apache, but PHP just has the error I saw on screen.
[20-Jun-2014 15:02:48 US/Pacific] PHP Fatal error: Maximum execution time of 30 seconds exceeded in F:\Software Development\(PHP) SpychMed International\HTDOCS\scripts\upload\class.upload.php on line 5006
I have another domain with GoDaddy, which is where this is going to end up. So I just tested the code again, and while it took ages to upload, it did. Since we're here, might I ask how to set a maximum size (dimensions) for an upload? That way I can have a large image version, but it won't be over a certain number of pixels, like width*length.Reply
Oh yes, my network card is having a lot of trouble. I get about 2 maybe 3 megabits up and down right now at best. Just awful. I'll be replacing it soon. However, I don't want to necessarily block large images. I want to downsize large images that are over a certain number of pixels.Reply
It seems as if image_ratio, image_x, and image_y can achieve an image under a given width and height... am I right? Just reading the documentation. Very unusual behavior for me.Reply
However on my server when I add that line to the script, the page works fine until I click upload, and then I get a blank page.
I've determined that the script dies right at the first
( dunno if the BBS is going to work )
Any ideas?
Besides, your webserver's log will tell you why the script crashes.
[20-Jun-2014 15:02:48 US/Pacific] PHP Fatal error: Maximum execution time of 30 seconds exceeded in F:\Software Development\(PHP) SpychMed International\HTDOCS\scripts\upload\class.upload.php on line 5006
I have another domain with GoDaddy, which is where this is going to end up. So I just tested the code again, and while it took ages to upload, it did. Since we're here, might I ask how to set a maximum size (dimensions) for an upload? That way I can have a large image version, but it won't be over a certain number of pixels, like width*length.
As for limiting the images that can be uploaded, check out image_max_width, image_max_height, and image_max_pixels.
Just reading the documentation. Very unusual behavior for me.
image_ratio_xxx, image_x and image_y are used to resize an image.
Note that when you instantiate the class, you can read the images data with image_src_x, image_src_y and image_src_pixels and act accordingly.