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.
Basically, if it works with a small picture, but not with a large one, it is likely to be a memory problem. In that case, 40MB is not enough for the picture, or for the graphic tasks you ask the class to do.
Otherwise, check your permissions, the /tmp directory, whether you have open_basedir restrictions, etc...Reply
Otherwise, check your permissions, the /tmp directory, whether you have open_basedir restrictions, etc...