tojja(a)Safe-mail.net wrote:
I decided to try setting the open_basedir setting to
be "/htdocs/dir"
(with the wiki living inside a subdirectory of this). Now file uploads
fail because, for some unknown reason, mediawiki insists on dumping
temporary files inside "/tmp" which is outside my open_basedir path,
this despite setting php's "upload_tmp_dir" and allowing mediawiki's
temporary directory to be inside "/htdocs/dir". For some reason
mediawiki is forcing the temporary upload path to be /tmp and I don't
see how to change this. Any ideas on how to fix this other than
digging around and hacking includes/upload code? Thanks.
What MediaWiki version are you using?
This looks like Bug 24898 recently fixed in r71457.
Looking at php sys_get_temp_dir() comments, seems that it doesn't always
account for upload_tmp_dir changes.
You can try setting TMPDIR/TMP/TEMP environment variable and see if
it picks it.
See wfTempPath() function at includes/GlobalFunctions.php for the actual
code which determines it.