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
tmpfile() returns false if it is unable to create the temporary file. Make sure your tmp folder is writable and try and check what sys_get_temp_dir() function returns.
false
sys_get_temp_dir()