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.
If it doesn't work (but your code still works for small images), it means that you have a memory problem.
If when you try to increase the memory, it doesn't work, and your PHPinfo() doesn't show the memory increase, it means that your host doesn't allow you to raise the memory limit. That is common on shared hosting.
If it is the case, you don't have many solutions. You can try to bribe your host into raising the memory limit, or else you will have to upload smaller images.Reply
If when you try to increase the memory, it doesn't work, and your PHPinfo() doesn't show the memory increase, it means that your host doesn't allow you to raise the memory limit. That is common on shared hosting.
If it is the case, you don't have many solutions. You can try to bribe your host into raising the memory limit, or else you will have to upload smaller images.