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

Jump to: navigation, search
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOCright}}
{{TOCright}}
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.
The Repair Settings Tool (''repair_settings.php'') can be used to repair some of the most crucial settings on your forum, such as [[database|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.
'''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: [http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php repair_settings.php].
==Download the Repair Settings Tool==


==How to use repair_settings.php==
You can download the Repair Settings Tool (''repair_settings.php'') from the tools section of the SMF Downloads center: [http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php repair_settings.php].
 
==Using the Repair Settings Tool==
 
Upload the file ''repair_settings.php'' with an [[[FTP_-_How_do_I_use_FTP|FTP client]] 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 ''<nowiki>www.example.com</nowiki>'' you need to go to: ''<nowiki>http://www.example.com/repair_settings.php</nowiki>''. If it is located in a sub-directory named, for example ''forum'', you need to go to: ''<nowiki>http://www.example.com/forum/repair_settings.php</nowiki>''.


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 ''<nowiki>www.example.com</nowiki>'' you need to go to: ''<nowiki>http://www.example.com/repair_settings.php</nowiki>''. If it is located in a sub-directory named, for example ''forum'', you need to go to: ''<nowiki>http://www.example.com/forum/repair_settings.php</nowiki>''.
'''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!


== Repairable Settings ==
== Repairable Settings ==


In most cases, SMF can detect the correct value for each of the fields and settings listed below. The tool will display a link under each item with a recommended value; clicking these links will update the corresponding text box fields with the recommended value. Be careful though, because SMF will not always guess correctly if the server is configured unusually.
In most cases, the Repair Settings Tool can detect the correct value for each of the fields and settings listed below. The tool will display a link under each item with a recommended value; clicking these links will update the corresponding text box fields with the recommended value. If you want the recommended value to be used for all of the settings on the page, scroll down to the bottom of the page and click on the link ''Restore all settings''. Be careful though, because SMF will not always guess the values correctly if the server is configured unusually.


=== Critical Settings ===
=== Critical Settings ===
Line 20: Line 24:
* '''Maintenance Mode''' - You can choose to turn [[maintenance mode]] on or off for your forum, and it is also possible to make your forum completely unusable (inaccessible even to administrators).
* '''Maintenance Mode''' - You can choose to turn [[maintenance mode]] on or off for your forum, and it is also possible to make your forum completely unusable (inaccessible even to administrators).
* '''Language File''' - This changes the language of your forum.
* '''Language File''' - This changes the language of your forum.
* '''Cookie Name''' - This changes the name of the cookie that your forum creates for the user's browser.
* '''Cookie Name''' - This changes the name of the [[Settings.php#.24cookiename|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'' compared to ''../index.php?topic=1.0'').
* '''Queryless URLs''' - Turns the use of queries in the forum's URLs on and off (''../index.php/topic,1.0.html'' compared to ''../index.php?topic=1.0''). In the Admin Center, this setting is referred to as [[SMF2.0:Features_and_Options#General|Search engine friendly URLs]].
* '''Output Compression''' - Turns output compression on and off.
* '''Output Compression''' - Turns output compression on and off.
* '''Database driven sessions''' - Sets whether sessions are managed by the database.
* '''Database driven sessions''' - Sets whether sessions are managed by the database.
*'''Set SMF default theme as overall forum default for all users''' - This will override the theme preference in the profiles of all users.
*'''Set SMF default theme as overall forum default for all users''' - This will override the [[Profile#Look_and_Layout|theme preference]] in the profiles of all users.


=== Database Settings ===
=== Database Settings ===


This section includes all of the typical settings that are needed to connect to the MySQL database of your forum:  
This section includes all of the typical settings that are needed to connect to the [[database]] of your forum:  


*'''Server'''
*'''Server'''
Line 34: Line 38:
*'''Username'''
*'''Username'''
*'''Password'''
*'''Password'''
{{ {{Localized|Version specific}}|small=yes|version=2.0+|content=
*'''SSI Username''' (optional)
*'''SSI Username''' (optional)
*'''SSI Password''' (optional)
*'''SSI Password''' (optional)}}
*'''Table prefix'''
*'''Table prefix'''
*'''Connection Type''' (''Standard'' or ''Persistent'')
*'''Connection Type''' (''Standard'' or ''Persistent'')
Line 45: Line 50:
In this section, you can check that the directory paths and URLs are set correctly for your forum:
In this section, you can check that the directory paths and URLs are set correctly for your forum:


*Forum URL
*'''Forum URL'''
*Forum Directory
*'''Forum Directory'''
*Sources Directory
*'''Sources Directory'''
*Cache Directory
{{ {{Localized|Version specific}}|small=yes|version=2.0+|content=
*Attachment Directory
*'''Cache Directory'''}}
*Avatar URL
*'''Attachment Directory'''
*Avatar Directory
*'''Avatar URL'''
*Smileys URL
*'''Avatar Directory'''
*Smileys Directory  
*'''Smileys URL'''
*'''Smileys Directory'''


For more information on each of the settings above, please see [[Server settings]].
For more information on each of the settings above, please see [[Server settings]].
Line 59: Line 65:
===Paths & URLs for Themes===
===Paths & URLs for Themes===


This section enables you to check that the directory paths and URLs for your installed themes are correct:
This section enables you to check that the directory paths and URLs are correct for the default theme as well as for any other themes that you have installed.
<!--
*'''SMF Default Theme - Curve URL'''
*'''SMF Default Theme - Curve Images URL'''
*'''SMF Default Theme - Curve Directory'''
*'''Core Theme URL'''
*'''Core Theme Images URL'''
*'''Core Theme Directory'''
-->


*SMF Default Theme - Curve URL
==Options==
*SMF Default Theme - Curve Images URL
*SMF Default Theme - Curve Directory
*Core Theme URL
*Core Theme Images URL
*Core Theme Directory


==Options==
The following options appear at the bottom of the page when using the Repair Settings Tool:


*'''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.
*'''Restore all settings''' - This changes all the settings to the ''recommended values'', which saves you the effort of clicking on each individual link for the recommended values (as found below each setting). As mentioned above, there is no guarantee that the tool will detect all of the correct settings, so you should use this button with caution.
{{ {{Localized|Version specific}}|small=yes|version=2.0+|content=
{{ {{Localized|Version specific}}|small=yes|version=2.0+|content=
*'''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.}}
*'''Remove all hooks''' - If [[Modification_(term)|mods]] have installed [[Integration hooks|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.}}
*'''Remove this file. Careful, it may not work in all servers!''' - If you click this button, the tool will attempt to delete the file ''repair_settings.php'' in the root directory of your SMF installation. This is for security reasons. You might have to delete the file manually with your FTP client, though.
*'''Save Settings''' - Don't forget to click on this button in order to save the changes that you have made.


== 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 first have to save any changes to the database, base forum URL and directory paths. After you have saved these 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, you would in fact be making changes to the old forum/location.
If you are using a different set of database details (perhaps due to moving your forum, or because you are trying to set up a secondary or test forum), make sure you use the Repair Settings Tool in the following order:
 
# Run the Repair Settings Tool and make changes <u>only</u> in the database section. You must save the updated database settings ''before'' you do anything else.
#Run the Repair Settings Tool again. Now you can adjust the directory paths and URLs for your forum.
 
It is important to use the tool in the above order because some of the directory paths and URLs (such as those for attachments, avatars, and smileys) are stored in the database. This means that if you attempt to change these paths and URLs before you have reset your forum to use the new database, you will in fact be making changes to the old forum database.

Latest revision as of 14:02, 27 August 2014

The Repair Settings 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.

Download the Repair Settings Tool

You can download the Repair Settings Tool (repair_settings.php) from the tools section of the SMF Downloads center: repair_settings.php.

Using the Repair Settings Tool

Upload the file repair_settings.php with an [[[FTP_-_How_do_I_use_FTP|FTP client]] 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

In most cases, the Repair Settings Tool can detect the correct value for each of the fields and settings listed below. The tool will display a link under each item with a recommended value; clicking these links will update the corresponding text box fields with the recommended value. If you want the recommended value to be used for all of the settings on the page, scroll down to the bottom of the page and click on the link Restore all settings. Be careful though, because SMF will not always guess the values correctly if the server is configured unusually.

Critical Settings

  • Maintenance Mode - You can choose to turn maintenance mode on or off for your forum, and it is also possible to make your forum completely unusable (inaccessible even to administrators).
  • Language File - This changes the language of your forum.
  • Cookie Name - This 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 compared to ../index.php?topic=1.0). In the Admin Center, this setting is referred to as Search engine friendly URLs.
  • Output Compression - Turns output compression on and off.
  • Database driven sessions - Sets whether sessions are managed by the database.
  • Set SMF default theme as overall forum default for all users - This will override the theme preference in the profiles of all users.

Database Settings

This section includes all of the typical settings that are needed to connect to the database of your forum:

  • Server
  • Database name
  • Username
  • Password
  • SSI Username (optional)
  • SSI Password (optional)
  • Table prefix
  • Connection Type (Standard or Persistent)

If you are unsure about any of the above settings, please contact your host.

Paths & URLs

In this section, you can check that the directory paths and URLs are set correctly for your forum:

  • Forum URL
  • Forum Directory
  • Sources Directory
  • Cache Directory
  • Attachment Directory
  • Avatar URL
  • Avatar Directory
  • Smileys URL
  • Smileys Directory

For more information on each of the settings above, please see Server settings.

Paths & URLs for Themes

This section enables you to check that the directory paths and URLs are correct for the default theme as well as for any other themes that you have installed.

Options

The following options appear at the bottom of the page when using the Repair Settings Tool:

  • Restore all settings - This changes all the settings to the recommended values, which saves you the effort of clicking on each individual link for the recommended values (as found below each setting). As mentioned above, there is no guarantee that the tool will detect all of the correct settings, so you should use this button with caution.
  • 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.
  • Remove this file. Careful, it may not work in all servers! - If you click this button, the tool will attempt to delete the file repair_settings.php in the root directory of your SMF installation. This is for security reasons. You might have to delete the file manually with your FTP client, though.
  • Save Settings - Don't forget to click on this button in order to save the changes that you have made.

Important Note

If you are using a different set of database details (perhaps due to moving your forum, or because you are trying to set up a secondary or test forum), make sure you use the Repair Settings Tool in the following order:

  1. Run the Repair Settings Tool and make changes only in the database section. You must save the updated database settings before you do anything else.
  2. Run the Repair Settings Tool again. Now you can adjust the directory paths and URLs for your forum.

It is important to use the tool in the above order because some of the directory paths and URLs (such as those for attachments, avatars, and smileys) are stored in the database. This means that if you attempt to change these paths and URLs before you have reset your forum to use the new database, you will in fact be making changes to the old forum database.



Advertisement: