Newly installed mediawiki 1.28.0 errors: Operation not permitted & not a valid stream resource

284 Views Asked by At

I was trying to migrate my 1.17.2 MediaWiki installation onto a new hosting site, but due to mysql (vs. mysqli) decprecation, I went ahead installed a fresh copy of MediaWiki 1.28.0 and will attempt to migrate what I need later. However, this didn't install cleanly.

Warning: rename(/tmp/l10n_cache-en.cdb.tmp.886259483,/tmp/l10n_cache-en.cdb): Operation not permitted in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php on line 89

Warning: fclose(): 186 is not a valid stream resource in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php on line 236 [WHqpF8C5gMYAATYRG-UAAAJy] 2017-01-14 22:41:28: Fatal exception of type MWException

Warning: fwrite(): 186 is not a valid stream resource in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php on line 100

Warning: fclose(): 186 is not a valid stream resource in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php on line 236

Warning: unlink(/tmp/l10n_cache-en.cdb.tmp.886259483): No such file or directory in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php on line 237

Fatal error: Uncaught exception 'Cdb\Exception' with message 'Error writing to CDB file "/tmp/l10n_cache-en.cdb.tmp.886259483".' in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php:239 Stack trace: #0 /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php(102): Cdb\Writer\PHP->throwException('Error writing t...') #1 /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php(215): Cdb\Writer\PHP->write('\x00\f\xD1\xB69\xCC\x02\x00') #2 /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php(82): Cdb\Writer\PHP->finish() #3 /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer.php(88): Cdb\Writer\PHP->close() #4 [internal function]: Cdb\Writer->__destruct() #5 {main} thrown in /home2/accountname/public_html/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/PHP.php on line 239

The new host is eHost. I've installed MediaWiki many times over the last decade on different hosts and this is the first time I've had significant issues. It looks like something is trying to write to /tmp? Not cool, but is it configurable?

1

There are 1 best solutions below

0
On

I found the answer. I set this variable within my LocalSettings.php to a writable directory:

$wgTmpDirectory = "/home2/accountname/public_html/tmp";

Further credit to: https://phabricator.wikimedia.org/T127127