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 === false
The tmpfile() function is returning false. I can’t seem to figure out why. I’m having a hard time wading through Google on this one.
The script it only broken on my local test environment, OSX 10.6.7, running MAMP 1.9.5. Fortunately the live site is working fine.
tmpfile() returns
falseif it is unable to create the temporary file. Make sure your tmp folder is writable and try and check whatsys_get_temp_dir()function returns.