Repair settings.php: Difference between revisions From Online Manual

Jump to: navigation, search
m (Bot: Automated text replacement (-& +&))
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:repair_settings.php}}{{TOCright}}
{{DISPLAYTITLE:repair_settings.php}}{{TOCright}}
The tool [[Repair_settings.php]] is a tool to be used to repair some of the more crucial settings for your forum. Simply download this file and upload it to your forum, putting it in the same directory as your Settings.php file.
The tool Repair_settings.php is a tool to be used to repair some of the more crucial settings for your forum. Simply download this file and upload it to your forum, putting it in the same directory as your Settings.php file.


As always, it might be a good idea to ''backup'' your forum, first. Using this tool shouldn't, ever, cause any problems. But, the internet being the way that it is, you never know. It's always best to be safe, rather than sorry.
As always, it might be a good idea to ''backup'' your forum, first. Using this tool shouldn't, ever, cause any problems. But, the internet being the way that it is, you never know. It's always best to be safe, rather than sorry.
Line 6: Line 6:
Then, navigate with your browser to your usual forum URL. But, instead of "/index.php", point your browser to "/repair_settings.php
Then, navigate with your browser to your usual forum URL. But, instead of "/index.php", point your browser to "/repair_settings.php


For example, if your forum's in the root of your site, and your site is at '''www.example.com''' you'd need to navigate to:
For example, if your forum's in the root of your site, and your site is at '''<nowiki>www.example.com</nowiki>''' you'd need to navigate to:


http://www.example.com/repair_settings.php
<nowiki>http://www.example.com/repair_settings.php</nowiki>


If it's in a sub-directory named, say "forum", you'd need to navigate to:
If it's in a sub-directory named, say "forum", you'd need to navigate to:


http://www.example.com/forum/repair_settings.php
<nowiki>http://www.example.com/forum/repair_settings.php</nowiki>


This script allows you to change the most important settings such as MySQL information, file paths and urls, and can be used when SMF is not working at all. That is what it is mostly used for: repairing your SMF enough so that an admin user can login and fix any other problems.
This script allows you to change the most important settings such as MySQL information, file paths and urls, and can be used when SMF is not working at all. That is what it is mostly used for: repairing your SMF enough so that an admin user can login and fix any other problems.
Line 33: Line 33:


==== Paths & URLs ====
==== Paths & URLs ====
* '''Allows you set 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.
* '''Allows you set 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.


If you use multiple attachment directories in smf 2.*, do NOT use this version of repair_settings.php as it does not support multiple attachment directories. You need to use  [https://github.com/emanuele45/tools/blob/master/repair_settings.php this version] instead. If you use this version copy the RAW version to a file of the same name on your server, do NOT copy and paste the source of the page to your server.
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.  
 
Please note that this DOES NOT correct the paths for custom themes, because the tool is not updated to locate the names and paths of custom themes. Those paths have to be set in the admin panel, under themes and layout>Theme settings. At the bottom of the page, click "Attempt to reset all themes" and the paths will be updated, automatically. Please note, though, that with the use of this script, and clicking the link to reset your default theme paths, you will set all of your users to the default theme.
If you wish to try out the new "Work in progress" version of this script, to have it fix your custom themes directories and a few other tweaks, download the version [https://github.com/downloads/emanuele45/tools/repair_settings.zip here]. This updated version of the script will allow you to keep your custom theme as default and NOT reset to the default theme, unless you select the option. Please remember this version is not officially supported by the SMF team, at this time. So, use this version at your own risk and let's stress the fact that you REALLY ought to backup, before using this tool.


=== Recommended values ===
=== Recommended values ===
In most cases, SMF can detect the correct value for each of the fields and settings. Underneath many of the settings is a link with with the recommended value. Clicking these links will update the corresponding textbox fields with the recommended 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. Underneath many of the settings is a link with with the recommended value. Clicking these links will update the corresponding textbox fields with the recommended value. Be careful though, because SMF will not always guess correctly if the server is configured unusually.
===Restore all settings===
On the bottom of the file 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 wanted clicking remove all hooks will insure that all mods have all parts removed/disabled. Do not use this button unless you know what you are doing.


=== Download ===
=== Download ===

Revision as of 20:09, 2 July 2013

The tool Repair_settings.php is a tool to be used to repair some of the more crucial settings for your forum. Simply download this file and upload it to your forum, putting it in the same directory as your Settings.php file.

As always, it might be a good idea to backup your forum, first. Using this tool shouldn't, ever, cause any problems. But, the internet being the way that it is, you never know. It's always best to be safe, rather than sorry.

Then, navigate with your browser to your usual forum URL. But, instead of "/index.php", point your browser to "/repair_settings.php

For example, if your forum's in the root of your site, and your site is at www.example.com you'd need to navigate to:

http://www.example.com/repair_settings.php

If it's in a sub-directory named, say "forum", you'd need to navigate to:

http://www.example.com/forum/repair_settings.php

This script allows you to change the most important settings such as MySQL information, file paths and urls, and can be used when SMF is not working at all. That is what it is mostly used for: repairing your SMF enough so that an admin user can login and fix any other problems.

Using repair_settings.php is easy: simply upload the file to the root directory of your forum with FTP and then access the page in your browser. Once you have finished the maintenance, remember to delete the file. If you do not delete the file, you will leave your forum vulnerable!

Settings the tool can repair

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

Critical Settings

  • Maintenance Mode - You can turn maintenance mode on your forum on and off and also make it completely unusable.
  • Language File - Change the language of your forum.
  • Cookie Name - Change the name of the cookie that your forum creates for the user's browsers.
  • Queryless URLs - Turn 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 - Can turn output compression on and off.
  • Database driven sessions - Can set whether sessions are managed by the database or not.

MySQL Settings

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

Paths & URLs

  • Allows you set 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. Underneath many of the settings is a link with with the recommended value. Clicking these links will update the corresponding textbox fields with the recommended value. Be careful though, because SMF will not always guess correctly if the server is configured unusually.

Restore all settings

On the bottom of the file 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 wanted clicking remove all hooks will insure that all mods have all parts removed/disabled. Do not use this button unless you know what you are doing.

Download

The repair_settings.php modules can be downloaded at the SMF download page: Download > Tools > repair_settings.php



Advertisement: