Jump to content

Recommended Posts

Posted

Hi together!

After installation i tried to install a language pack, but after dragging the file into the field i got an error with the following message:

"Error writing to /tmp. Please define $config->uploadTmpDir and ensure it is writable."

I tried to edit the config.php in the dir site and add the following line:

$config->uploadTmpDir = dirname(__FILE__) . '/tmp';

But that is also not a solution. Does anybody know a solution for this problem? I have the problem with every kind of uploading a file.

I am happy about every answer.

Regards, Bluemagicon

Posted

Hi and welcome to Processwire forum.

I had similar problem before on one older server hosting. Their server needed writable directory "tmp" in root of web ad this directory was not there. I fixed it simply with creating that /tmp folder and set write permissions without messing with $config->uploadTmpDir variable.

There is another thread i found in forum too.

  • 5 months later...
Posted

Wish there was an answer to this. After upgrading to 2.4.0

I try to upload image and it says:

Error writing to /tmp. Please define $config->uploadTmpDir and ensure it is writable

I do have tmp directory at the root and it is writable (0777) . If someone knows how to fix this please share!

Posted

When you say you have a tmp directory at the root, do you mean the root of your site, or the root of your server? It needs to be the latter.

Otherwise, have you tried following those instructions?

Create this folder: /site/assets/uploads/ and set its permissions appropriately.

Then in your config.php file, enter this:

$config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/';

That should work - let us know how you go.

PS alternatively, you could point that config directive to the /tmp directory if it is at the root of your site.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...