I am trying to upload a JPG image using a PHP script, but the image is keeps causing my script to time out and die giving this error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate
2136 bytes) in image.php on line 38
How can I prevent the upload from taking place if the image is too big, or have this error fail gracefully?