Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: [Unknown] on October 13, 2004, 12:54:38 AM

Title: What is repair_settings.php?
Post by: [Unknown] on October 13, 2004, 12:54:38 AM
For a more up to date version of this tutorial please see the On Line Manual (http://wiki.simplemachines.org/smf/Repair_settings.php)

This file, repair_settings.php (http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php), is a tool to be used to repair some of the more crucial settings for your forum.  Simply upload the file, and navigate your browser to:

http://www.example.com/forum/repair_settings.php
(where www.example.com/forum is your forum's URL.)

It can change maintenance mode, database-driven sessions, your default forum language, your cookie name, the format of URLs ("index.php/topic,1.0.html" vs. "index.php?topic=1.0"), your database connection information, and very importantly your URLs and paths.

Please note that if you installed SMF earlier than version 1.0 RC1, you will probably need to use this tool to restore your forum to working condition after changing servers or domains.  For versions 1.0 RC1 and later, these changes should be automatically detected and fixed.

You may also need to use this file if you change one of the above settings, and your forum stops working properly.  While this should not happen often, it is possible, which again is why this tool is provided.

If you would like to see more or different functionality in repair_settings.php, please say so in this topic.

Thanks,
-[Unknown]

Download repair_settings.php (http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php)
Title: Re: What is repair_settings.php?
Post by: marcnyc on October 26, 2004, 05:33:14 AM
Thanks for your suggestions.
The repair_settings.pho trick, altough very useful to know, didn't work for me and I found that the problem is that I can't log in to MySQL (version 4.0.21, to answer your question) with the user I had created in phpMyAdmin for the SMF database (even though I have assigned all priviledges to it). I have no idea why this is, but I thought I'd just follow your other suggestion and clean-install SMF locally assigning as user the master "root" user whose login works.
This has solved the issue and I now have SMF locally, awesome!
Thanks
Title: Re: What is repair_settings.php?
Post by: michel on January 14, 2005, 09:43:34 AM
I tried the link, but it doesn't work for me. It could be that I did something wrong, so could you please be more specific?
Title: Re: What is repair_settings.php?
Post by: CapriSkye on January 14, 2005, 10:32:46 AM
what do you mean it doesn't work?
what you have to is download that file, then upload it to your smf's root folder, for example http://yourwebsite.com/smfdir/
then run it by going to http://yourwebsite.com/smfdir/repair_settings.php
now just follow the instruction
Title: Re: What is repair_settings.php?
Post by: charlottezweb on January 28, 2005, 03:47:58 PM
I assume this works for current SMF releases?

Thanks,
Jason
Title: Re: What is repair_settings.php?
Post by: Ben_S on January 28, 2005, 03:52:35 PM
Sure does.
Title: Re: What is repair_settings.php?
Post by: charlottezweb on January 28, 2005, 04:18:25 PM
Great, thanks Ben!

-Jason
Title: Re: What is repair_settings.php?
Post by: soulmanpete on March 21, 2005, 06:40:19 AM
downloaded it then uploaded it to my SMF folder in file manager and nothing must be doing something wrong
dont worry got it to work thanks :)
Title: Re: What is repair_settings.php?
Post by: Greybrow on March 22, 2005, 03:06:13 AM
It fixed my problems with my forum, which was started from yabb, then yabbse, and smf. And had few server changes.
Good work!
Title: Re: What is repair_settings.php?
Post by: MuNieK on March 28, 2005, 03:14:59 PM
why there are all recomended settings like  "home2/blablabla" ?? i dont have those folders at my ftp... oO
 
i cant change my sources and smf folders urls at "edit server settings" and when im sending pms to other users of forum im getting this error:

2: mail() has been disabled for security reasons
File: /home2/pe/peacemakers/Sources/Subs-Post.php
Line: 377
Title: Re: What is repair_settings.php?
Post by: [Unknown] on March 28, 2005, 03:17:53 PM
why there are all recomended settings like  "home2/blablabla" ?? i dont have those folders at my ftp... oO

Because these are the full paths, not your FTP paths.  They are different - and SMF won't work without the full (proper) paths.

Quote
i cant change my sources and smf folders urls at "edit server settings" and when im sending pms to other users of forum im getting this error:

2: mail() has been disabled for security reasons
File: /home2/pe/peacemakers/Sources/Subs-Post.php
Line: 377

Well, that looks clear as day to me - it's been disabled by your host!  You'll have to use SMTP instead of sendmail, then, in Edit Features and Options.

-[Unknown]
Title: Re: What is repair_settings.php?
Post by: MuNieK on March 28, 2005, 03:21:18 PM
hmm i dont have email account on my host so what should i write there in options at:
SMTP server
SMTP port
SMTP username
SMTP password

?

and i dont have this folder at my ftp:
/home2/pe/peacemakers/Sources/Subs-Post.php

everything is in main folder i mean without any additional folders. damn i dont understund this staff :S

and when im changing to smtp im getting this error massage:

2: fsockopen() has been disabled for security reasons
File: /home2/pe/peacemakers/Sources/Subs-Post.php
Line: 556

thats not all :)
the upload avatar option dont work :/ and atachments neither T_T
Title: Re: What is repair_settings.php?
Post by: Grudge on March 28, 2005, 04:28:07 PM
Oh my...

It looks to me that your host has disabled basically everything that is of any use to a web site! Without fsockopen I don't believe you can use SMTP. I cannot believe they have disabled mail - I've never heard of that being a security concern - unless they are worried about the amount of mail it generates?

Basically, without neither or those I think it's impossible for your site to send email. Note this would be the same with any other PHP script - they have basically closed off possible avenues for getting mail out. I would ask them why they have disabled them both if I were you. Maybe someone here has a clever way around this, but I cannot see how myself.

Grudge

EDIT: Would I be right in assuming this is a free host? I can't imagine a real host would disable mail functionality!
Title: Re: What is repair_settings.php?
Post by: MuNieK on March 29, 2005, 02:35:05 PM
please tell me some other free host for forum about my guild. Im tired of searching for them and filling up some blanks etc. :S im lost. If u can give me plz some links for free , good hosts. :(
Title: Re: What is repair_settings.php?
Post by: Trekkie101 on March 29, 2005, 02:41:11 PM
Although they are post2host its one of the best.

www.astahost.com and www.trap17.com

The same admin runs them, dont spam, they deal with that. Trap17 is general chat and Astahost is computer centered talk, there actually pretty good and ive been with them for around a year.
Title: Re: What is repair_settings.php?
Post by: MuNieK on March 30, 2005, 09:26:19 AM
its hard to get free host there if i understund what they wrote there... i need to "contribute"? sorry my english isnt the best and i dont know what shuold i do? Do u know some free hosters without any funny things like that? I just want to fill data and get host...
Title: Re: What is repair_settings.php?
Post by: eksimba on March 30, 2005, 12:21:17 PM
Regarding free SMF hosting, did you see this post (http://www.simplemachines.org/community/index.php?topic=29521.0) from the other day?
Title: Re: What is repair_settings.php?
Post by: smitheejr on April 02, 2005, 11:17:22 PM
I hope this is right thread to put this.  I just moved my site from one server to another.  I followed the steps in the moving server thread (downloaded, uploaded through myphp, used the repair settings and chose all the suggestions).   The index page looks fine, everything is there; topics, last posts, latest members, etc.  However, there are two problems. 1)  it no longer sees me as administer...it's not accepting my password...I get a database error, try again later.   2) almost no matter what I click on (topics, categories, etc.)  I get an error of   Unknown column 'b.override_theme' in 'field list' 
the only things that work are if I click on stats or View 10 Most Recent Posts...and those posts do show up (unless I clink on the link to the actual post).

I'm wondering if it's an upgrade problem.  The original board is 1.0 Beta and the new board is the latest 1.0.3.    Or is it some other problem.  How to fix?
Title: Re: What is repair_settings.php?
Post by: [Unknown] on April 03, 2005, 05:17:25 AM
Your database was NOT 1.0.3, but you're using 1.0.3 sources.  You'll need to use upgrade.php to upgrade your old database.

-[Unknown]
Title: Re: What is repair_settings.php?
Post by: smitheejr on April 03, 2005, 01:05:31 PM
I was afraid of that.   I was avoiding doing that because I'm worried about losing my current data (bad experiences in the past).   On the old server I don't have myphp and since smf doesn't have a simple restore button if things go wrong...so I've not been anxious monkey with the old board.   But that server is going away in a few days and I have to get this up and running on the new server, so I guess I better take a chance.  If it's not too much trouble, could someone explain step-by-step (without myphp) how to upgrade.  I saw the steps elsewhere but they require exporting from myphp.    

edit:    Re-reading the upgrade page it says I can use the update zip as this is an old board....is it correct that I download this zip, extract it and then ftp all of these files over the existing ones?  This won't ruin any of the current posts or categories?   Then online I pull up update.php?  Am I missing any steps or is there something else I should be doing?  Thanks.
Title: Re: What is repair_settings.php?
Post by: [Unknown] on April 03, 2005, 06:28:26 PM
edit:    Re-reading the upgrade page it says I can use the update zip as this is an old board....is it correct that I download this zip, extract it and then ftp all of these files over the existing ones?  This won't ruin any of the current posts or categories?   Then online I pull up update.php?  Am I missing any steps or is there something else I should be doing?  Thanks.

You've got everything ready to go.  Upload the upgrade.php file and run it.... that's it.  This won't ruin any posts, members, categories, topics, boards, smiley sets, themes, or anything else.

-[Unknown]
Title: Re: What is repair_settings.php?
Post by: smitheejr on April 04, 2005, 03:42:17 AM
Worked like a charm!  Thanks, everyone!
Title: Re: What is repair_settings.php?
Post by: soulmanpete on April 12, 2005, 05:40:32 AM
Nearly  :)there run the program but cant save get
Settings.php cannot be written to by your webserver. Please modify the permissions on this file to allow write access.
Change the permissions in my file manager nothing happens
 :(
Title: Re: What is repair_settings.php?
Post by: [Unknown] on April 12, 2005, 06:40:40 AM
How do I use chmod? (http://www.simplemachines.org/community/index.php?topic=23690.0)

-[Unknown]
Title: Re: What is repair_settings.php?
Post by: Drifter on May 15, 2005, 04:39:52 PM
Ok,
This really works  ;D i tried this early today but i guess i was doing something wrong as i just tried it again and hey presto i am up and running again. Thanks for this post.
Title: Re: What is repair_settings.php?
Post by: dæmon on July 19, 2005, 06:42:37 PM
Will this work with the 1.1 public beta?
Title: Re: What is repair_settings.php?
Post by: [Unknown] on July 19, 2005, 06:50:43 PM
Yes.

-[Unknown]
Title: Re: What is repair_settings.php?
Post by: allfripou on July 21, 2005, 05:13:38 PM
It would be nice if repair_settings sets correctly also the path of the themes, at least the default one.

Would it be possible?
Title: Re: What is repair_settings.php?
Post by: [Unknown] on July 21, 2005, 07:03:46 PM
The default theme is editable by repair_settings.php.

-[Unknown]
Title: Re: What is repair_settings.php?
Post by: Lisah on September 14, 2005, 10:33:21 AM
I just finished moving my forums to a new domain name. Following the instructions (download,edit settings.php upload run repair_settings etc...)

Now when I try to see my forums I get an error MSG saying....

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


I have checked and my database is up and running, so I'm not sure what the problem could be. If it helps I'm running 1.1 Beta 3 Public.
Title: Re: What is repair_settings.php?
Post by: Lisah on September 14, 2005, 11:07:45 AM
I got it. I had missed an option in the repair_settings.php.
Title: Re: What is repair_settings.php?
Post by: cirkit on October 10, 2005, 09:15:02 AM
woohoo this Repair_settings.php really does work....now smilies/avatars work again  :D
Title: Re: What is repair_settings.php?
Post by: mecane on October 27, 2005, 08:12:34 AM
Thank you very much for this job.
after a problem with a mod i have hab some problems with the foum.
repair_settings.php do a great job !

you save my afternoon :) let's go see the sun ;)



Title: Re: What is repair_settings.php?
Post by: eye97 on October 28, 2005, 07:29:17 AM
I also have this problem:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

And used this repair setting file and everything was correct in there. But I still get this message. Any ideas?

Also when I save settings, I get this: Some settings are not being shown because the MySQL connection information is incorrect.

I have entered the right name and password and local host is 127.0.0.1 and the correct database info.
Title: Re: What is repair_settings.php?
Post by: rickyreter on November 09, 2005, 04:26:07 AM
its says not a valid win32 application...... :(
Title: Re: What is repair_settings.php?
Post by: xenovanis on November 09, 2005, 04:27:51 AM
You can't run it as a windows application. You need to  upload it to your forumlocation and point your browser at it, like http://www.youdomain.com/forum/repair_settings.php
Title: Re: What is repair_settings.php?
Post by: eragonn on November 13, 2005, 07:20:54 AM
well...I did try it, but I get this error :

Queryless URLs:
Value not found!
Title: Re: What is repair_settings.php?
Post by: Sheepy on November 13, 2005, 11:48:03 AM
Don't worry nothing is wrong.  By SMF 1.1 it is on by default. Or so says the changelog.
Title: Re: What is repair_settings.php?
Post by: eragonn on November 13, 2005, 11:57:46 AM
But the forum is still full of errors!

And I dont want to reinstall it again...

What can I do to restore the forum?

I know im annoying, but please, understand me!
Title: Re: What is repair_settings.php?
Post by: Sheepy on November 14, 2005, 09:26:50 AM
No, no, I'm not saying you're annoying or something. (Sigh)

If it says cannot connect to database, it's usually either 1) Incorrect connection setting or 2) MySQL not running or 3) Installation failed (or something messed with db after installation)

If it's something else, well, try to describe your problem at the support board.
Title: Re: What is repair_settings.php?
Post by: eragonn on November 14, 2005, 01:31:37 PM
I did, but there aint a ******ing single soul that want to help me out....lame support around there....<.<


Well....I'll try it here, maybe you read it or not!


I did want to change the forum url from this one ( http://web1.39186.vs.webtropia.com ) into this one ( www.l2-aod.com ), but it seams that I did mess something up.....


And now I cant login, I cant even change the changes I did....Please help me, I dont want to install it again....


Another thing....I get this msg when I enter the forum(at the buttom of the page)

Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is using an ILLEGAL copy of SMF!

This msg did pup up after I did the changes, and I also did try to upgrade from 1.0.5 to the newest one....1.1RC or something
Title: Re: What is repair_settings.php?
Post by: Xarcell on November 24, 2005, 11:12:08 AM
I get this problem at the bottom of the repair_settings page.

Warning: Unknown(): open(/tmp/sess_98ae7a61fe75c9d52ce870e55a9fddd8, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
Title: Re: What is repair_settings.php?
Post by: Prasad007 on January 03, 2006, 04:34:51 AM
Thank you so very much for this repair tool! Just what i needed! will try it out now!! :) :)
Title: Re: What is repair_settings.php?
Post by: vdubbia on January 18, 2006, 07:32:52 PM
So just to clarify...  I want to change the location of my forum from www.mysite.com to www.mysite.com/forum/. 

To do so I should first upload this script to my current root folder (vs. the new one), then after I run the script indicating the www.mysite.com/forum/ folder, I then copy all my forum files to that folder?

Which do I do first?

Thanks.
Title: Re: What is repair_settings.php?
Post by: vdubbia on January 18, 2006, 08:04:54 PM
So just to clarify...  I want to change the location of my forum from www.mysite.com to www.mysite.com/forum/. 

To do so I should first upload this script to my current root folder (vs. the new one), then after I run the script indicating the www.mysite.com/forum/ folder, I then copy all my forum files to that folder?

Which do I do first?

Thanks.

Okay, I jumped right in and changed the settings via the script... things looked good, so I went ahead and created my new subfolder and moved my forum folders to the appropriate place on my server.  When I put in my www.mysite.com/forum link, all my .css is gone... I have the skeleton of my forum, but the style, even the default template does not appear.

Any ideas?
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 18, 2006, 08:06:59 PM
Make sure that you didn't miss any files during the moving.

-JayBachatero
Title: Re: What is repair_settings.php?
Post by: vdubbia on January 18, 2006, 08:23:14 PM
Make sure that you didn't miss any files during the moving.

-JayBachatero

Thanks for the quick response... I did make sure that all files were moved.  Is there any way the .css could get messed up by doing this?  Do I have to do anything special with installed themes?
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 18, 2006, 08:29:17 PM
Can you please provide a link to your forum?

-JayBachatero
Title: Re: What is repair_settings.php?
Post by: vdubbia on January 18, 2006, 08:31:08 PM
edit
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 18, 2006, 08:38:41 PM
I'm able to see it w/o any problems.  Do a hard refresh: FF: CTRL R   IE- CTRL F5

-JayBachatero
Title: Re: What is repair_settings.php?
Post by: vdubbia on January 18, 2006, 08:40:37 PM
You can see it normally now because I changed everything back to the way it was...

Just wanted to get some tips before I tried again... so you're saying that nothing should mess up the .css by doing this move.  Seems easy enough, just surprised to see all the styles lost.

I'm 100% sure I moved everything, but I can try again.
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 18, 2006, 08:46:20 PM
Maybe an issue with your FTP client.  It shouldn't get messed up. 

EDIT:  I reread your other post.  You should run repair_settings.php AFTER you do the move.

-JayBachatero
Title: Re: What is repair_settings.php?
Post by: vdubbia on January 18, 2006, 08:47:57 PM
Alright... will try again and report back.

Thanks for the info!
Title: Re: What is repair_settings.php?
Post by: Saynt on February 04, 2006, 06:25:18 PM
When I click on the link to download repair_settings.php it says the page cannot be found! wtf.

going insane
going insane
going insane
going insane
Title: Re: What is repair_settings.php?
Post by: JayBachatero on February 05, 2006, 05:31:26 PM
Can you please try to download it again. I tried to download it and it worked for me.
Title: Re: What is repair_settings.php?
Post by: shortbuser on February 14, 2006, 03:37:00 PM
I must be an idiot, I click on the link in the first post to download repair_settings.php and it takes me to the SMF download page. Where is this magical mystical file to be found?
Title: Re: What is repair_settings.php?
Post by: JayBachatero on February 14, 2006, 04:23:21 PM
Here.  There seem's to be an issue with the download system and files with PHP extensions.
Title: Re: What is repair_settings.php?
Post by: Xerxes on February 27, 2006, 07:16:09 PM
Alright, I downloaded it and used all the suggested options. My message icons and smileys still don't work. It seems to just be the javascript that doesn't allow users to click on icons and add them to the message box. The forum seems to work just fine though. I think it may be an issue with my new hosting company. I switched from a windows server to linux. I'll check with their support section. They offer SMF as part of their hosting package. I'm sure someone has come across this over there.

Running: SMF 1.1 RC2
Title: Re: What is repair_settings.php?
Post by: JayBachatero on February 27, 2006, 10:41:33 PM
Try replacing the script.js file on the default theme with a new one.  If that doesn't work PM me a test account.
Title: Re: What is repair_settings.php?
Post by: Misplaced on March 04, 2006, 05:16:35 PM
You may also need to use this file if you change one of the above settings, and your forum stops working properly.  While this should not happen often, it is possible, which again is why this tool is provided.  If this tool does not solve your problems, please try repair_paths.php (http://www.simplemachines.org/download.php?d=repair_paths;t=php)

Is there any way to get this tool as well (the link only brings up the SMF download page for forum software... nothing else)?  I've attempted repair_settings.php, but I'm getting the message: "Some settings are not being shown because the MySQL connection information is incorrect."  (The information I entered is correct.)

Currently my forum is inaccessable:  http://www.storsteinanderson.com/testsmf/index.php (http://www.storsteinanderson.com/testsmf/index.php) (I have 1.1 rc2) with the error message:  "Connection Problems  Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later. "

Right now I'm willing to beg borrow or steal to get this fixed if possible.  So, if you could direct me where I can download repair_paths.php, I'd greatly appreciate it!  Thank you!
Title: Re: What is repair_settings.php?
Post by: raven.find on March 04, 2006, 10:20:07 PM


When i hit the download link it takes me to the main download page for the application.  I have looked and don't see it there.  Where is it?
Title: Re: What is repair_settings.php?
Post by: JayBachatero on March 04, 2006, 10:54:47 PM
Here you go.
Title: Re: What is repair_settings.php?
Post by: ddonzal on March 23, 2006, 06:43:43 PM
Gotta say, this saved my butt. Many, many thanks.
Title: Re: What is repair_settings.php?
Post by: Col on June 25, 2006, 03:56:02 PM
I just had a weird situation where I had to use this utility. I moved server last night, and temporarily used the IP address in the settings, with a link from the old forum. No problem, and today the servername had propagated, at least for me, so I changed the the settings to use the URL. Again, no problem, but shortly afterwards, for some weird reason, the name propagation reverted to the old host. Anyway, because I had changed the settings, I was trapped at the index page. Any time I tried to do anything, I was directed to the old forum, because that is where domain name was pointing. So, I used this utility to change the URL back to an IP, but was alarmed to see the warning appear on the forum about the high security vulnerability. It may as well carried a link to the repair settings file with the database password in plain view.

If you are going to have a warning, please place it in the admin area, or make it visable to logged-in admins only. Of course this is a useful tool, but some thought should be given to display of the warning.

Thanks.
Title: Re: What is repair_settings.php?
Post by: JayBachatero on June 25, 2006, 04:56:08 PM
The warning is only showed to Admins ;)
Title: Re: What is repair_settings.php?
Post by: Col on June 25, 2006, 06:19:41 PM
It did cross my mind as I was writing the above, but I thought, 'it would probably indicate that, wouldn't it'!? ::) ;D Anyway, glad to hear it. It did give me some palpitations at the time! :D
Title: Re: What is repair_settings.php?
Post by: JayBachatero on June 25, 2006, 08:39:46 PM
All of those warning messages are shown ONLY to admins.
Title: Re: What is repair_settings.php?
Post by: ssanner on July 27, 2006, 10:42:45 AM
Fantastic guys, tried the repair_settings.php and it did the trick.  :P
Title: Re: What is repair_settings.php?
Post by: LoKi` on August 09, 2006, 10:45:50 AM
I've installed the newest version of SMF and only the security patch (from package manager) was needed.
I recieve errors after creating new categories on the forum. The error appears only when I try to manage categories over admin center.

Quote
Can't create/write to file '/var/lib/mysql/tmp/#sql_1094_0.MYI' (Errcode: 2)
File: /srv/www/htdocs/test/Sources/Subs-Boards.php
Line: 1457

I've runned the "repair_settings.php" tool and the problem was still there. On plus, it seems that some options won't save at all.

Quote
Queryless URLs:
Value not found!
Output Compression:
Value not found!  
Database driven sessions:
Value not found!
Attachment Directory:
Value not found!    
Avatar URL:
Value not found!    
Avatar Directory:
Value not found!   
Smileys URL:
Value not found!   
Smileys Directory:
Value not found!   

Recommendations are made, but they just can't be saved. I don't see any error messages on the tool neither.
Title: Re: What is repair_settings.php?
Post by: xenovanis on August 09, 2006, 02:54:41 PM
The errormessage you're receiving has nothing to do with repair_settings; it's MySQL telling you something is wrong with the database. You should contact your host about this.

Getting Errors From MySQL? (http://www.simplemachines.org/community/index.php?topic=2486.0)
Title: Re: What is repair_settings.php?
Post by: LoKi` on August 10, 2006, 04:34:07 AM
I had mysql server started with no temporary (/var/lib/mysql/tmp/) parameter...
thank you for the support.
Title: Re: What is repair_settings.php?
Post by: reason1041 on January 08, 2007, 01:52:04 PM
what do you mean it doesn't work?
what you have to is download that file, then upload it to your smf's root folder, for example http://yourwebsite.com/smfdir/
then run it by going to http://yourwebsite.com/smfdir/repair_settings.php
now just follow the instruction
[/quo
what do you mean it doesn't work?
what you have to is download that file, then upload it to your smf's root folder, for example http://yourwebsite.com/smfdir/
then run it by going to http://yourwebsite.com/smfdir/repair_settings.php
now just follow the instruction
tied to visit the link after downloading the file and still cant get my forum up and running
Title: Re: What is repair_settings.php?
Post by: reason1041 on January 08, 2007, 03:05:52 PM
I think Ive messed up real big on LPs forum. Was going through all of the administrators options and came across something that said "Edit server settings" . All i did was rename a few things then once i clicked save. Now the following message comes up when you try to access the server:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


ive downloaded several applications and still cant access the forum. is there anyway you can try it.

liberatedpublishing.com/forum/repair_settings.php
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 08, 2007, 03:44:42 PM
FTP to your site and rename the Settings.php file to Settings_bak2.php.  Rename the Settings_bak.php to Settings.php.  After that rename Settings_bak2.php to Settings_bak.php
Title: Re: What is repair_settings.php?
Post by: 3nd3r on January 09, 2007, 03:44:16 AM
¿Do you think that repair_settings.php could fix this problem?

http://www.simplemachines.org/community/index.php?topic=139774.msg896307#msg896307
Title: Re: What is repair_settings.php?
Post by: 3nd3r on January 13, 2007, 07:13:34 AM
My problem is solved:

http://www.simplemachines.org/community/index.php?topic=129739.msg906205#msg906205
Title: Re: What is repair_settings.php?
Post by: CyndiMJJ on January 20, 2007, 11:11:57 AM
can I ask something if I repair the settings, will the board be damaged and will I loose EVERYTHING that I had on my forum??? this is a very important question... since I have lots of posts on my board!
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 20, 2007, 01:18:28 PM
No.  Repair settings will just repair the paths and database info if it's wrong.
Title: Re: What is repair_settings.php?
Post by: CyndiMJJ on January 21, 2007, 10:44:26 AM
Thanks problem is solved with me :D
Title: Re: What is repair_settings.php?
Post by: Kesvirit on January 23, 2007, 02:35:59 PM
   I'm trying to use the repair_settings.php attached above.  After uploading it, and opening it through the forum URL, filling it out completely and submitting it, I'm getting an error displayed above the page

"Notice: Undefined offset: 0 in /home/kidc/public_html/smboard/repair_settings.php on line 551"

Any suggestions where I should look to troubleshoot this?
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 23, 2007, 05:42:11 PM
Use the one here.
http://www.simplemachines.org/download/?tools
Title: Re: What is repair_settings.php?
Post by: Kesvirit on January 24, 2007, 05:07:51 AM
   I got the same error with the new file.   I looked more carefully and the problem was the settings.php was zero bytes.  After copying in each of my backups I found one that worked.  So I'm good now.  Yay for reading the whole thread.
Title: Re: What is repair_settings.php?
Post by: dmacdonald111 on January 31, 2007, 09:37:37 AM
I hope I'm in the right post here.

I've just installed SMF 1.1.1 and everything went smoothly with no errors displayed, etc. But it doesn't seem to want to display the graphics;

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.paid2hyip.com%2Fproblem.JPG&hash=bfd0dff883a818d0a6f22297467ffabc)

I have used the repair_settings.php and everything came up with the same settings as suggested. I have checked the mysql database and the admin section and there are no errors at all but the images still won't display.

I have not installed anything other than the forum.

Thanks.
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 31, 2007, 10:20:30 AM
Did you upload all the files that came with the archive?  Seems like you didn't upload the icons dir. http://www.paid2hyip.com/forum/Themes/default/images/icons/
Title: Re: What is repair_settings.php?
Post by: dmacdonald111 on January 31, 2007, 12:38:01 PM
I feel like such an idiot! lol. My ftp client actually timed-out and a load of stuff didn't get uploaded at all! Thanks anyhoo. Soz to waste yer time.  :-[
Title: Re: What is repair_settings.php?
Post by: JayBachatero on January 31, 2007, 12:42:05 PM
Use FileZilla (http://filezilla.sf.net).
Title: Re: What is repair_settings.php?
Post by: netlink on February 23, 2007, 08:04:38 AM
hi, can you use MSSQL instead MySQL? I get this error

Cannot connect to the MySQL database server with the supplied data.

If you are not sure about what to type in, please contact your host.
Unknown MySQL server host 'PENTIUM4\SQLEXPRESS' (11004)



and repair settings give me an error too:


Some settings are not being shown because the MySQL connection information is incorrect.
Title: Re: What is repair_settings.php?
Post by: Daniel15 on February 23, 2007, 08:12:58 AM
hi, can you use MSSQL instead MySQL? I get this error

Cannot connect to the MySQL database server with the supplied data.

If you are not sure about what to type in, please contact your host.
Unknown MySQL server host 'PENTIUM4\SQLEXPRESS' (11004)



and repair settings give me an error too:


Some settings are not being shown because the MySQL connection information is incorrect.
Currently, SMF is MySQL-only (although the next major version will support multiple database types, it won't be out for a while).
Title: Re: What is repair_settings.php?
Post by: netlink on February 23, 2007, 08:19:44 AM
thanks for the quick reply :)
Title: Re: What is repair_settings.php?
Post by: netlink on February 23, 2007, 10:07:37 AM
does it make conflict if you run both mysql and mssql 2005?
Title: Re: What is repair_settings.php?
Post by: Daniel15 on February 23, 2007, 10:12:12 AM
does it make conflict if you run both mysql and mssql 2005?
It shouldn't... You should be able to run both of them on the same PC :)
Title: Re: What is repair_settings.php?
Post by: netlink on February 24, 2007, 02:19:18 AM
thanks Daniel, one more question :D I tried repair settings but they are having problems view the page

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.geocities.com%2Fsxyq8me%2Fkapi.JPG&hash=4c4dbb14f88ae9b7927eb6f648e97740)

but viewing from localhost, I don't have any problem...it shows all the images
Title: Re: What is repair_settings.php?
Post by: Daniel15 on February 24, 2007, 03:40:41 AM
It looks like you set the URL (during setup) to "localhost", rather than the correct URL.
Go to Admin Panel → Server Settings and make sure the correct URL is set. Then, go to Admin Panel → Themes and Layout → Themes and Settings, check the URL at the bottom of the page is correct, and click on "Attempt to reset all themes".

If you have any further problems, please make a seperate topic for them (it's not really related to this topic ;))
Title: Re: What is repair_settings.php?
Post by: RawVeganMom on March 31, 2007, 06:42:27 PM
Hello.  I cannot get the repair file to work.  It says Page not found error 404.

I just switched domain names and my smileys and other things are not clickable.  I hope you can help me!

My board: http://therawpath.com/forum/
Title: Re: What is repair_settings.php?
Post by: schzongx on April 03, 2007, 04:52:20 PM
This tools works like magic to me :)

Big Thanks!!!
Title: Re: What is repair_settings.php?
Post by: 01smicha on May 20, 2007, 12:18:56 PM

what you have to is download that file, then upload it to your smf's root folder, for example http://yourwebsite.com/smfdir/


how do you specify it to upload it to there?
Title: Re: What is repair_settings.php?
Post by: donnpipop on July 03, 2007, 12:08:36 AM
Thank you. This topic is very good for us. :-)
Title: Re: What is repair_settings.php?
Post by: wimvincken on October 09, 2007, 11:33:47 PM
Well, it is not true that the repair_settings.php is innocent. It screwed up my board.
http://www.writingcenter3.teamhost.us/index.php

It also reports critical errors, which are not there.
It refers to an error, which does not exist:
Fatal error: Call to undefined function: dropdownquicksearch() in /home/wimvinck/public_html/Sources/Load.php(1851) : eval()'d cod

There is no dropdownquicksearch in Load.php

So, be warned everyone. DON'T USE THE repair_settings.php!
Title: Re: What is repair_settings.php?
Post by: JayBachatero on October 09, 2007, 11:44:39 PM
How did repair_settings.php screw up your board? Seems to me like a mod issue and not an SMF issue.
Title: Re: What is repair_settings.php?
Post by: wimvincken on October 10, 2007, 12:03:17 AM
There were some problems in the board with some mods.  But the repair_settings.php really brought it to the attention and right now before I need to go to work.

Well, remove all mods in the board and see what happens, not?

Title: Re: What is repair_settings.php?
Post by: JayBachatero on October 10, 2007, 12:10:54 AM
repair_settings.php just fixes paths and the main settings located in Settings.php.  It has nothing to do with mods.  From the looks of the error it looks related to a dropdown search mod.  As for support in the mod's topic.
Title: Re: What is repair_settings.php?
Post by: wimvincken on October 10, 2007, 02:00:24 AM
How did repair_settings.php screw up your board? Seems to me like a mod issue and not an SMF issue.

No, the reason why this happened was not because of a mode.

I have the board up and running again, but when a user logs in, he gets the same mysterious error message. I downloaded the whol board to my PC, and no such word (dropdownquicksearch) appears anywhere.

I don't understand and I have no idea what to do. Can you advise me something?
Title: Re: What is repair_settings.php?
Post by: wimvincken on October 10, 2007, 02:35:53 AM
What do you suggest to do?

Maybe to create a new installation of SMF?
If I do, then:
1. Solve the mod problems I had
2. Can do a lot of cleaning up
3. I can auto-forward everything from the current URL to the new board when it is all setup and ready

But ...
How to import the users and posts from the previous board?
Title: Re: What is repair_settings.php?
Post by: wimvincken on October 10, 2007, 05:45:31 AM
There were some problems in the board with some mods.  But the repair_settings.php really brought it to the attention and right now before I need to go to work.

Well, remove all mods in the board and see what happens, not?



I am a happy man! Tralala!

The problem was that the directory for the default theme (SMF Default theme) was corrupted.

After I forced everyone to use a custom theme, the problem is resolved and everyone logs in correctly.

Voila!

Thanks for the help and I wil come back tonight with some very interesting issue for discussion. Until then.

Wim
Title: Re: What is repair_settings.php?
Post by: AON21 on November 12, 2007, 11:30:47 PM
The download link for repair_settings.php doesn't work for me - it takes me to the SMF converters download page (for converting from one Forum to another) I did a search on that page - no file by that name :(

ANy help welcome :)
Title: Re: What is repair_settings.php?
Post by: AON21 on November 12, 2007, 11:34:00 PM
Use the one here.
http://www.simplemachines.org/download/?tools
Thank you, thank you, thank you!
Title: Re: What is repair_settings.php?
Post by: KolaKube on November 29, 2007, 09:20:46 AM
Old thread this but I still like to give credit where its due.

This thread has helped me allot.

BIG thanks to the OP

Title: Re: What is repair_settings.php?
Post by: agent smith on March 11, 2008, 05:11:07 AM
I uploaded repair_settings.php and called it in my browser, but nothing happens, I get a blank screen and thats it. Is someone willing to help me out?
Title: Re: What is repair_settings.php?
Post by: jylane on March 13, 2008, 09:45:24 PM
Ok, I'm new to all this and seems I'm having a really bad day.  I keep deleting things completely by accident.  Anyways, I ran this as suggested and it said that the server was busy so I went back and looked at it but my password is missing from the MySQL password: section of the repair.  Does anyone know how to retrieve this information?  I deleted and tried again but still missing. 
Thank you
Title: Re: What is repair_settings.php?
Post by: vbgamer45 on March 13, 2008, 09:57:19 PM
Check inside settings_bak.php in the foot folder of your forum.
Title: Re: What is repair_settings.php? HELP HELP HELP!!!
Post by: NYSEMTD on March 16, 2008, 09:41:20 AM
Desperate Help Needed

When I try to connect to our forum I get an error saying Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


When i run repair settings_php I get
Some settings are not being shown because the MySQL connection information is incorrect.

The setting look ok as far as i can tell. Help Please!!!


www.cdmas.org is my home page just follow the forums link.
Title: Re: What is repair_settings.php?
Post by: bradleyjohnsonjr.us on March 28, 2008, 07:47:37 PM
It doesn't work for me because I have this message at the top with Some settings are not being shown because the MySQL connection information is incorrect.  how do I fix that
Title: Re: What is repair_settings.php?
Post by: dondon1205 on September 04, 2008, 10:51:44 PM
i have downloaded this file, what i do next? there's no exe file that i can install...what should i do next? i have the same problem "connecting problem".

thank alot bro
Title: Re: What is repair_settings.php?
Post by: [SiNaN] on September 04, 2008, 11:00:00 PM
What is repair_settings.php? (http://docs.simplemachines.org/index.php?topic=663)
Title: Re: What is repair_settings.php?
Post by: badmasketa on September 23, 2008, 02:50:30 PM
hi there!!

i wanna rename my current smf forum FOLDER to another
i.e old smf folder name is FORUM and i wanna rename to COMMUNITY

does this repairs_settings.php helps me to do that??

and does it renames the folder of FTP??
Title: Re: What is repair_settings.php?
Post by: [SiNaN] on September 25, 2008, 08:15:01 AM
It doesn't change the directory name in FTP. First manually change the name of the folder that your forum is in. Then use repair_settings.php to fix the directories.
Title: Re: What is repair_settings.php?
Post by: MithuS on October 03, 2008, 10:14:07 AM
Great feature!!

Thats work fine to me! I had lost my db connection (passwd) and this simple page gives me the solution.

Thanks !!
Title: Re: What is repair_settings.php?
Post by: l_d_allan on November 19, 2008, 02:32:10 PM
Quote
If you would like to see more or different functionality in repair_settings.php, please say so in this topic.

SMF 1.1.7 semi-newbie.

It was very helpful after a self-inflicted re-install to get themes working ok.

The following may or may not be related:

Since then I've noticed that:
Title: Re: What is repair_settings.php?
Post by: Dawn Ng on March 01, 2009, 09:03:59 PM
If I use this action, will my data (my post, members, post counts, board) be deleted? I hope not.
Title: Re: What is repair_settings.php?
Post by: Jim_W08 on March 08, 2009, 11:57:15 PM
This download is giving me 404 ATM. ???
Title: Re: What is repair_settings.php?
Post by: outlawsclan on March 24, 2009, 09:21:12 PM
This worked great!!!!
Thanks you saved my ass
Title: Re: What is repair_settings.php?
Post by: SleepinGiant on April 23, 2009, 01:40:19 PM
Awesome worked, great job everyone

SleepinGiant
Title: Re: What is repair_settings.php?
Post by: tarly on April 25, 2009, 01:16:21 PM
Ok i read the thread, i messed somtthin up and cant figure it out, i have downloaded the repair and changed all the sources.  But i still get an error when i go to the site.
atal error: Cannot redeclare template_hp_shoutboxmain() (previously declared in /home/content/t/f/o/tfotarly/html/Sources/Load.php(1735) : eval()'d code:61) in /home/content/t/f/o/tfotarly/html/Sources/Load.php(1735) : eval()'d code on line 271

I tried to install a shoutbox and this happened??
www.thefallenonesclan.com is the url

any help would be great

thanks
Vance
Title: Re: What is repair_settings.php?
Post by: wladymeer on June 21, 2009, 04:52:01 PM
For some reason, I tried to download it and I've got .htm file instead of .php - however, renaming it to .php did the trick
Title: Re: What is repair_settings.php?
Post by: kat on June 21, 2009, 04:58:33 PM
It's been doing that, for me, lately, too.  :(
Title: Re: What is repair_settings.php?
Post by: [SiNaN] on June 22, 2009, 01:01:49 PM
For some reason, I tried to download it and I've got .htm file instead of .php - however, renaming it to .php did the trick

It's been doing that, for me, lately, too.  :(

It works fine for me with FF 3 and IE 8. What's your browser?
Title: Re: What is repair_settings.php?
Post by: kat on June 22, 2009, 02:13:29 PM
I've tried Opera, Firefox, that M$ thing and K-Meleon.
Title: Re: What is repair_settings.php?
Post by: wladymeer on June 26, 2009, 02:00:57 PM
It works perfectly, but it asks me to save as repair_settings.htm - I've changed extension to .php and it worked.

Anyway, I'm using Opera beta 10 and right now I've tried IE8, Opera 9.64 and Firefox 3.0.6 and it seems that both Operas are the only causing this "problem" as it saves as a php in IE and FF.

Title: Re: What is repair_settings.php?
Post by: dillon on February 04, 2010, 09:53:14 AM
I have run repair_settings.php and fixed all my path errors and deleted it.  Now the forum seems to be working but theme is gone.  It's just blank white behind all text.

Any help is appreciated.

Title: Re: What is repair_settings.php?
Post by: Arantor on February 04, 2010, 09:54:42 AM
Please open a new support topic in the appropriate support board with further details, including what theme you're using.
Title: Re: What is repair_settings.php?
Post by: dillon on February 04, 2010, 09:57:43 AM
Oops, sorry everyone.  After reading all 7 pages, I assumed this was the support thread.  Please delete.
Title: is there an updated version of repair_settings.php that fixes ALL themes?
Post by: Snaky_Love on October 28, 2010, 04:28:39 PM
is there an updated version of repair_settings.php that fixes ALL themes?
Title: Re: What is repair_settings.php?
Post by: Oya on October 28, 2010, 06:21:39 PM
no, it just fixes the default theme - you can fix the rest from inside the admin panel
Title: Re: What is repair_settings.php?
Post by: ravenzmoon on March 17, 2011, 02:29:35 AM
Just so you know I LOVE YOU GUYS!!!!  LOL   

I was installing a chat on a forum and I decided to clean the files up.  Well one of the 'extra forums' I had was listing all documents I needed for a site.    I had backed up everything BUT that one.  And after spending hours and hours trying to figure out if anything could be saved.  Tech experts telling me to just accept I had lost it all.... I said nooooooo.   I read this site for awhile and once again you saved my britches!!!   
Title: Re: What is repair_settings.php?
Post by: kat on March 17, 2011, 08:02:37 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fwoohoo2.gif&hash=6e2a3ff3ca9123cb5967c2dc06d9d71f)
Title: Re: What is repair_settings.php?
Post by: FireDitto on September 14, 2011, 08:53:54 PM
I'm going to move my site from;

mysite.com/forum to mysite.com

Before I do, I want to make sure I understand completely to avoid toasting it!

I move everything from the /forum out of the 'forum' folder, so instead of being "SPWOoc/forums" on my FTP it is simply "SPWOoc" and all the SMF folders follow down from there as they should.

Then I use repair_settings.php to correct the paths, and everything should work properly...

Correct?
Title: Re: What is repair_settings.php?
Post by: Suki on September 14, 2011, 09:53:17 PM
Yes, that is what you should do, remember before you do anything, make a forum and database back up, the database bacckup isnt really need it, but better safe than sorry.

When you use the repair_settings, below every path, SMF will try to detect your new path, 99% of the times that is correct, also, don't modify anything from the database settings, you will only have to edit the paths and urls.
Title: Re: What is repair_settings.php?
Post by: MrPhil on September 15, 2011, 09:08:06 PM
I'm going to move my site from;

mysite.com/forum to mysite.com
If the whole point of the exercise is to avoid having to type in "/forum" the first time someone visits, you'd be far better off using a redirect (in .htaccess file) to jump visitors to mysite.com directly to the /forum. Among other things, it will preserve members' bookmarks and the forum's search engine standings. It will keep your site root directory uncluttered, and it's always good to allow for future site growth -- put a blog in /blog, and a shop in /shop, etc. where they won't step on each other's toes; and you have a custom "landing page" with links to the forum, blog, etc.
Code: [Select]
RewriteEngine On
RewriteCond  %{REQUEST_URI} !^/forum
RewriteRule  ^(.*)$  /forum/$1 [L]
Title: Re: What is repair_settings.php?
Post by: FireDitto on September 15, 2011, 10:38:36 PM
Where does that code go?


And that's cool. I didn't know you could do that.

At present, I'm not worried about those options, as I've used the linked-databases tip and so have the sub-domains connected (ooc.website, rp.website, bts.website) and have the main (website.com) left uncluttered for all additional things. I also have the option to add more subdomains if I need to, and everything will, eventually, be linked directly from website.com to make things easier.

This is why I wanted to remove the /forum, since none of the others have it (the forums are dumped directly on the main sub) and I wanted to avoid confusion of why rp.website is at that address, while ooc is located at ooc.website.com/forum. Namely because I cheat and simply change the subdomain's name and press enter to jump directly to the same area on the other board; with the /forum it makes it somewhat more difficult and slightly confusing =)
Title: Re: What is repair_settings.php?
Post by: MrPhil on September 16, 2011, 10:35:17 PM
Where does that code go?
In the .htaccess file (assuming you have an Apache server).

Quote
I cheat and simply change the subdomain's name and press enter to jump directly to the same area on the other board; with the /forum it makes it somewhat more difficult and slightly confusing =)
Whatever floats your boat...  :laugh: