XF 2.2 temporary directory missing


We are getting

The upload failed because the temporary directory was missing. The site administrator will need to resolve this before any files can be uploaded.
when we attempt to upload files to the media gallery.
I thought the uploiad directory was internal_data/temp and that is there.

There's another thread that suggests overriding in php.ini but I'd like to understand why this is suddenly happening before I override with a get around!

Any ideas?



XenForo developer
Staff member
I presume this is the other thread you're referring to:

The internal_data/temp folder is a temporary location for XF to use, but the file upload side of things is handled by PHP itself. PHP places the file in a particular location (based on the upload_tmp_dir php.ini setting) before any PHP application actually runs, so it's not possible for XF to override that location within it's own code. It needs to be overridden in a server-specific (depending on PHP configuration) way.

In terms of why its just happened, presumably something has changed on the server, such as that value being changed or permissions on that directory changing so it's no longer writable.