Manual:$wgTmpDirectory/pt-br

From mediawiki.org
This page is a translated version of the page Manual:$wgTmpDirectory and the translation is 25% complete.
Outdated translations are marked like this.
URLs de servidor e caminhos de arquivo: $wgTmpDirectory
The path of the temporary directory.
Introduzido na versão:pre 1.1.0
Removido na versão:ainda em uso
Valores permitidos:(absolute path)
Valor padrão:The path to the directory for temporary files as determined by wfTempDir()[1] (1.20+)

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

(Nota: O valor padrão dessa variável depende de outras variáveis, tais como os valores definidos em Setup.php , after LocalSettings.php é executado)

Detalhes

Versão MediaWiki:
1.20

O caminho do sistema de arquivos local para um diretório temporário. Isso não é necessário para acessos a partir da web. 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.

Usado por wfTempDir() para controlar onde as necessidades de arquivos temporários do MediaWiki estão escritas, incluindo:

  • Arquivos temporários antigos e novos para executáveis externos baseados em motores de comparação externos configurados por $wgExternalDiffEngine
  • TempFSFile - usado para fazer o upload em partes, algumas transformações, e várias partes do código do arquivo de back-end.
  • Nó do UID Generator e arquivos de bloqueio.
  • Upload da URL
  • O diretório no qual o cache CACHE_DBA coloca seu arquivo de banco de dados DBA. Can be overridden using $wgObjectCaches [CACHE_DBA]['dir']. (removido na 1.23)
  • Importing uploads from XML dumps

Common pitfalls

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 tarefa T126736 for more information!

Usage in unsupported MediaWiki versions

Versão MediaWiki:
1.19

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

Referências

See also