User:Chainy/sandbox2: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
No edit summary
Line 12: Line 12:
'''ATTENTION:''' The ''repair_settings.php'' tool displays sensitive information about your server setup, namely the database user and password. Make sure that you delete it once you have finished the maintenance!
'''ATTENTION:''' The ''repair_settings.php'' tool displays sensitive information about your server setup, namely the database user and password. Make sure that you delete it once you have finished the maintenance!


== Download == <!--T:6-->
== Repairable Settings ==


The ''repair_settings.php'' modules can be downloaded from the SMF download page: ''[http://download.simplemachines.org/ Download] > [http://download.simplemachines.org/?tools Tools] > [http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php repair_settings.php]''
For more information on each of the following settings, please see [[server settings]].


=== Settings the Tool Can Repair === <!--T:7-->
=== Critical Settings ===
For more information on each of these settings, please see [[server settings]].


==== Critical Settings ==== <!--T:8-->
* '''Maintenance Mode''' - Turns maintenance mode on and off for your forum, and it also makes your forum completely unusable.
* '''Maintenance Mode''' - Turns maintenance mode on and off for your forum, and it also makes your forum completely unusable.
* '''Language File''' - Changes the language of your forum.
* '''Language File''' - Changes the language of your forum.
Line 27: Line 25:
* '''Database driven sessions''' - Sets whether sessions are managed by the database.
* '''Database driven sessions''' - Sets whether sessions are managed by the database.


==== Database Settings ==== <!--T:9-->
=== Database Settings ===
 
* '''Includes all of the typical settings that are needed to connect to the database''' - Database server address, database name, database username, database password, and database table prefix.
* '''Includes all of the typical settings that are needed to connect to the database''' - Database server address, database name, database username, database password, and database table prefix.
* '''Database connection type''' - Can be set to Persistent or Standard.
* '''Database connection type''' - Can be set to Persistent or Standard.


==== Paths & URLs ==== <!--T:10-->
=== Paths & URLs ===
 
* '''Allows you to set the paths for''' - Forum URL, Forum Directory, Sources Directory, Attachment Directory, Avatar URL, Avatar Directory, Smileys URL, Smileys Directory, Default Theme URL, Default Theme Images URL, and Default Theme Directory and Custom Theme Directories.
* '''Allows you to set the paths for''' - Forum URL, Forum Directory, Sources Directory, Attachment Directory, Avatar URL, Avatar Directory, Smileys URL, Smileys Directory, Default Theme URL, Default Theme Images URL, and Default Theme Directory and Custom Theme Directories.


<!--T:11-->
''Repair_settings.php'' will allow you to keep your custom theme as default and not reset to the default theme, unless you select the option toward the top of the page.  
''Repair_settings.php'' will allow you to keep your custom theme as default and not reset to the default theme, unless you select the option toward the top of the page.  


=== Recommended values === <!--T:12-->
=== Recommended values ===  
 
In most cases, SMF can detect the correct value for each of the fields and settings. Below many of these settings there is a link with a recommended value. Clicking these links will update the corresponding text box fields with this value. Be careful though, because SMF will not always guess correctly if the server is configured unusually.
In most cases, SMF can detect the correct value for each of the fields and settings. Below many of these settings there is a link with a recommended value. Clicking these links will update the corresponding text box fields with this value. Be careful though, because SMF will not always guess correctly if the server is configured unusually.


===Restore all settings=== <!--T:13-->
===Restore all settings===
 
At the bottom of the file there is an option to restore all settings. This will change all values to their default.
At the bottom of the file there is an option to restore all settings. This will change all values to their default.


{{ {{Localized|Version specific}}|small=yes|version=2.0+|content=
{{ {{Localized|Version specific}}|small=yes|version=2.0+|content=


===Remove all hooks=== <!--T:14-->
===Remove all hooks===  
If mods have installed hooks and a clean install is desired, clicking "Remove all hooks" will ensure that all mods have all elements removed/disabled. Do not use this button unless you know what you are doing.}}
 
If mods have installed hooks and a clean install is desired, clicking ''Remove all hooks'' will ensure that all mods have all elements removed/disabled. Do not use this button unless you know what you are doing.}}


=== Important Note===  
=== Important Note===  
If you have moved your forum or are trying to set up a secondary or test forum using a different set of database details, you will have to make the database changes and changes to the base forum URL and path, and then save the edits. After you have saved the edits, re-run repair_settings.php to adjust the theme settings, the avatar settings, and the attachment settings.  This group of settings is stored in the database, and if you attempt to change these before you have reset your forum to use the new database, then you would be making changes to the old forum/location.
If you have moved your forum or are trying to set up a secondary or test forum using a different set of database details, you will have to make the database changes and changes to the base forum URL and path, and then save the edits. After you have saved the edits, re-run repair_settings.php to adjust the theme settings, the avatar settings, and the attachment settings.  This group of settings is stored in the database, and if you attempt to change these before you have reset your forum to use the new database, then you would be making changes to the old forum/location.

Revision as of 23:12, 23 August 2014

The tool repair_settings.php can be used to repair some of the most crucial settings on your forum, such as database information, file paths, and URLs. The tool can be used to repair an SMF installation sufficiently enough so that an admin can then login and fix any other problems.

Backup first! - Using this tool should not cause any problems, but it is always better to make a backup, just in case.

You can download repair_settings.php from the Tools section of the SMF Downloads center: repair_settings.php.

How to use repair_settings.php

Upload the file with FTP to the root directory of your forum (where Settings.php can be found). Navigate with your browser to your usual forum URL, but instead of yoursitename/index.php, direct your browser to yoursitename/repair_settings.php. For example, if your forum is in the root directory of your site, and your site is at www.example.com you need to go to: http://www.example.com/repair_settings.php. If it is located in a sub-directory named, for example forum, you need to go to: http://www.example.com/forum/repair_settings.php.

ATTENTION: The repair_settings.php tool displays sensitive information about your server setup, namely the database user and password. Make sure that you delete it once you have finished the maintenance!

Repairable Settings

For more information on each of the following settings, please see server settings.

Critical Settings

  • Maintenance Mode - Turns maintenance mode on and off for your forum, and it also makes your forum completely unusable.
  • Language File - Changes the language of your forum.
  • Cookie Name - Changes the name of the cookie that your forum creates for the user's browser.
  • Queryless URLs - Turns the use of queries in the forum's urls on and off ("index.php/topic,1.0.html" vs. "index.php?topic=1.0").
  • Output Compression - Turns output compression on and off.
  • Database driven sessions - Sets whether sessions are managed by the database.

Database Settings

  • Includes all of the typical settings that are needed to connect to the database - Database server address, database name, database username, database password, and database table prefix.
  • Database connection type - Can be set to Persistent or Standard.

Paths & URLs

  • Allows you to set the paths for - Forum URL, Forum Directory, Sources Directory, Attachment Directory, Avatar URL, Avatar Directory, Smileys URL, Smileys Directory, Default Theme URL, Default Theme Images URL, and Default Theme Directory and Custom Theme Directories.

Repair_settings.php will allow you to keep your custom theme as default and not reset to the default theme, unless you select the option toward the top of the page.

Recommended values

In most cases, SMF can detect the correct value for each of the fields and settings. Below many of these settings there is a link with a recommended value. Clicking these links will update the corresponding text box fields with this value. Be careful though, because SMF will not always guess correctly if the server is configured unusually.

Restore all settings

At the bottom of the file there is an option to restore all settings. This will change all values to their default.

Remove all hooks

If mods have installed hooks and a clean install is desired, clicking Remove all hooks will ensure that all mods have all elements removed/disabled. Do not use this button unless you know what you are doing.

Important Note

If you have moved your forum or are trying to set up a secondary or test forum using a different set of database details, you will have to make the database changes and changes to the base forum URL and path, and then save the edits. After you have saved the edits, re-run repair_settings.php to adjust the theme settings, the avatar settings, and the attachment settings. This group of settings is stored in the database, and if you attempt to change these before you have reset your forum to use the new database, then you would be making changes to the old forum/location.



Advertisement: