upload_tmp_dir
is an optional setting in php.ini
. Php will attempt to use the system default temp directory. So it should just work.
If something happens to the permissions on your temp directory, regardless of wether you set it in php.ini
or use the system default (usually /tmp
on unix like systems), then media uploads will fail. You will see the same error “Missing a temporary folder” if folder doesn’t exist, but also if you don’t have proper permissions on the temporary directory.
Your web server, Apache or whatever, is probably running as nobody, or some other account with basically no rights to anything. So the first thing to check is that /tmp
is globally writable.
On unix like systems it goes something like this. I’m assuming that your system default temp directory is /tmp
. From the command line
$ ls -l /tmp
lrwxrwxrwx@ 1 root admin 11 Sep 10 11:40 /tmp
The first bit lrwxrwxrwx
should look just like that. No dashes. If not
$ chmod 777 /tmp
and if it gives you permissions errors
$ sudo chmod 777 /tmp
You’ll need the root password.