1

I ran unto an issue when upgrading from 1.24.0 to 1.27.0.

Since I'm on a shared server and have multiple Mediawiki installations, the system temp folder is being shared across them all. This is causing a MWException error on page load. Obviously this will cause problems since temp content of one wiki will overwrite the content of another.

So I've declared a custom temp directory: (Paste into LocalSettings.php)

$wgTmpDirectory = "$IP/images/temp";

While this fixes the issue, I'm not sure it's a secure practice. I see many other people using this fix... But is it safe to have the temp folder PUBLICLY visible?

This documentation is all I can find explaining what is dumped into the temp folder. And here is a bug report of the root issue.

  • A saner approach is to use something like <your system temp folder>/mediawiki/<wikiname>. – Tgr Jul 19 '16 at 15:29
1

I believe that I've stumbled across a solid answer.

Instead we can point to the default tmp directory by using $wgUploadDirectory. Then we can dump the temp files into a unique sub-directory.

Custom temp directory code: (Paste into LocalSettings.php)

$wgTmpDirectory = "{$wgUploadDirectory}/tmp/uniquename";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.