Руководство:AdminSettings.php
Эта функция была полностью удалена в версии 1.23. |
Файл MediaWiki: AdminSettings.php | |
---|---|
Расположение: | / |
Исходный код: | нет в Git (created by user) |
Классы: |
Подробнее
Требование для AdminSettings.php
(вместе с поддержкой файла AdminSettings.sample
) был удален в mediawiki 1.16.
До MediaWiki 1.16 для хранения учетных данных для проверки подлинности сценариев обслуживания и для контроля наличия profileinfo.php
.
Окончательно он был полностью удален в MediaWiki 1.23.
Обновление
If upgrading from a pre-1.16 version of MediaWiki to version 1.16 or later, the variables set in AdminSettings.php
file can be safely removed.
AdminSettings.php
is no longer needed.
If it still exists, it will be loaded by maintenance scripts to retain backward compatibility.
Prior to 1.16
Manually create AdminSettings.php
in the root directory of the MediaWiki installation.
Typically, this is done by renaming AdminSettings.sample
to AdminSettings.php
and then editing AdminSettings.php
appropriately.
AdminSettings.php
should set three variables:
$wgDBadminuser
- the name of a database account that has sufficient privileges to run the database maintenance scripts. For MySQL databases, this account should have "superuser" privileges. For PostgreSQL databases, this account should be the same account used for $wgDBuser .$wgDBadminpassword
- the password for the$wgDBadminuser
account.$wgEnableProfileInfo
- controls the availability ofprofileinfo.php
.
Example
<?php
/* Database authentication credentials */
$wgDBadminuser = 'wikiadmin';
$wgDBadminpassword = 'adminpass';
/* Whether to enable the profileinfo.php script. */
$wgEnableProfileInfo = false;
?>
Security
AdminSettings.php contains sensitive information (account names and passwords) that can help an attacker compromise your database management system. Ensure that you've taken the relevant preventative measures listed in Руководство:Безопасность and Manual:Securing database passwords .
PostgreSQL-specific issues
If using PostgreSQL with your MediaWiki installation, the authentication credentials used for $wgDBadminuser
and $wgDBadminpassword
should be the same as the credentials used for $wgDBuser
and $wgDBpassword
.
This is necessary to ensure that the owner for new tables is set correctly.