If you back out your changes then uploads work fine.
I would suspect your issue has to do with the changes you made to your php not the code.
Let's get back to where things were and send us info so we can see your issue. I run php 5 so I need to see your site.
Likewise any change you make in php to point to some directory on your server you would have to make sure any directory you state EXISTS and is 777 PERMISSIONS.