# tmpdir 'missing' after php upgrade

## Enceladia

Hi,

I just upgraded mysql and php and my webserver is now running php-4.4.4-r6, php-5.1.6-r6, apache-2.0.58-r2 and mysql-5.0.26-r1

Everything seems to be working fine, but any attempt to upload a file using one of my websites returns:

> Array ( [name] => File.PDF [type] => [tmp_name] => [error] => 6 [size] => 0 )

in $_Files which hints to UPLOAD_ERR_NO_TMP_DIR

Any idea how and where to reset the tmpdir option?

And yes, it did work before that  :Wink: 

----------

## CodAv

I ran into the same problem. Setting upload_tmp_dir to /tmp in /etc/php/apache2-php4/php.ini solved the issue.

If your server is used by multiple users, you should additionally specify this directive per apache vhost, and create a separate temp dir for every user and set open_basedir accordingly.

----------

## Enceladia

Thanks, that did it  :Very Happy: 

But since I haven't changed the config - or rather stopped etc-update from changing it - this poses the question why it did work before without specifically defining upload_tmp_dir   :Confused: 

It must have been using "system default" (like described in comments) then. 

Is this something that was deliberately changed in the latest version of php?

----------

## llongi

Yeah, it was a side-effect of a security fix...

Basically now even upload_tmp_dir is checked against the open_basedir setting, so you'd need to add /tmp (the default temporary directory) to open_basedir too (if open_basedir is set) for it to work correctly.

----------

