I\'ve got an image upload script which was previously working. It\'s now broken, and I\'ve traced the problem down to one line:
$temp = tmpfile(); // $temp
First, enable all PHP warnings to see if it is telling you something.
Second, check your temp folder and make sure PHP has write access to it. It's possible that certain "safe mode" restrictions (base dirs, etc) are preventing access.