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.
more info about the class
Do you have the test files (offered in the class package) working?
Does the class work when you upload a file (which is not an image)?
Do you have an open_basedir restriction?
Can you output $foo->log, and paste it here? As well as a link to a phpinfo()?