Jump to content

Manual:AdminSettings.php: Difference between revisions

From mediawiki.org
Content deleted Content added
m TNTN
General editions
Line 1: Line 1:
{{ {{TNTN|removed}} |1.16}}
{{ {{TNTN|removed}} |1.16}}
{{MW file|AdminSettings.php|NotInGit=created by user}}
{{TNT|MW file|AdminSettings.php|NotInGit=created by user}}


==Overview==
==Details==
The requirement for <code>AdminSettings.php</code> (along with supporting file <code>AdminSettings.sample</code>) was rudimentarily removed in MediaWiki 1.16. Prior to MediaWiki 1.16, <code>AdminSettings.php</code> was used to store database authentication credentials for [[Manual:Maintenance scripts|maintenance scripts]] and to control the availability of <code>[[Manual:Profileinfo.php|profileinfo.php]]</code>. It has finally been removed completely in MediaWiki 1.23.
The requirement for <code>AdminSettings.php</code> (along with supporting file <code>AdminSettings.sample</code>) was rudimentarily removed in MediaWiki 1.16. Prior to MediaWiki 1.16, <code>AdminSettings.php</code> was used to store database authentication credentials for [[Manual:Maintenance scripts|maintenance scripts]] and to control the availability of <code>[[Manual:Profileinfo.php|profileinfo.php]]</code>. It has finally been removed completely in MediaWiki 1.23.


Line 17: Line 17:


===Example===
===Example===
<source lang="php">
<syntaxhighlight lang="php" style="overflow:auto;">
<?php
<?php
/* Database authentication credentials */
/* Database authentication credentials */
Line 26: Line 26:
$wgEnableProfileInfo = false;
$wgEnableProfileInfo = false;
?>
?>
</syntaxhighlight>
</source>


===Security===
===Security===

Revision as of 17:07, 5 January 2015

Details

The requirement for AdminSettings.php (along with supporting file AdminSettings.sample) was rudimentarily removed in MediaWiki 1.16. Prior to MediaWiki 1.16, AdminSettings.php was used to store database authentication credentials for maintenance scripts and to control the availability of profileinfo.php. It has finally been removed completely in MediaWiki 1.23.

Upgrading

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 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:

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 Manual:Security 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.