A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Manual:$wgTmpDirectory below:

Manual:$wgTmpDirectory - MediaWiki

The path of the temporary directory.
Introduced in version: Before 1.1.0 Removed in version: Still in use Allowed values: (absolute path) Default value: The path to the directory for temporary files as determined by wfTempDir()[1] (1.20+)

"{$wgUploadDirectory }/tmp" (pre 1.1-1.19)

(Note: The default value of this variable depends on other variables, such as the values set in Setup.php , after LocalSettings.php is executed) MediaWiki version:

1.20

The local filesystem path to a temporary directory. This is required to be writable. It shouldn't be accessible from the web, so try to place it outside of the document root (recommended) or at least deny any access from the web via .htaccess or webserver configuration. Having files from this folder accessible from the web can be a security risk.

$wgTmpDirectory is used by wfTempDir() to control where MediaWiki writes temporary files to, including:

If you are getting this error, an incorrect setting for $wgTmpDirectory often is the cause:

Warning: rename(/tmp/l10n_cache-en.cdb.tmp.335721450,/tmp/l10n_cache-en.cdb): Operation not permitted in /.../vendor/wikimedia/cdb/src/Writer/DBA.php on line 59

Fatal exception of type MWException: Warning: dba_close(): supplied resource is not a valid DBA identifier resource in /.../vendor/wikimedia/cdb/src/Writer/DBA.php on line 54

Fatal error: Uncaught Cdb\Exception: Unable to move the new CDB file into place. in /.../vendor/wikimedia/cdb/src/Writer/DBA.php:60 

The solution is to set $wgTmpDirectory to a folder, which actually is writable by the webserver user.

Sometimes it is useful to have separate directories for the web server and CLI user, if they require different permissions. For example:

$wgTmpDirectory = $IP . '/images/tmp-' . php_sapi_name();

See T126736 for more information!

MediaWiki version:

1.19

The path to the temporary directory. When using CACHE_DBA as your $wgMainCacheType , this allows you to select which directory is used.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4