Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: b4pjoe on January 23, 2021, 11:33:30 AM

Title: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 23, 2021, 11:33:30 AM
When I download the repair_settings.php file from https://download.simplemachines.org/index.php?tools it is giving me the version for "@version 2.1.2".

When I try running on it my 2.0.x forum I get these errors.

Where I can I download the version for SMF 2.0.x?
Title: Re: SMF 2.0.x repair_settings download
Post by: Aleksi "Lex" Kilpinen on January 23, 2021, 11:37:56 AM
2.1.2 seems right, it is the version of the script itself, and it works on my 2.0 just fine.
Are you running the tool from the same directory as your forum's settings.php is in?
What issue are you trying to fix?
Title: Re: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 23, 2021, 11:41:28 AM
I'm actually wanting to move my forum to a new location and I need to run repair_settings.php to change the locations of all files. See the errors on the above attachment.

And yes it is in the same directory as settings.php.
Title: Re: SMF 2.0.x repair_settings download
Post by: Aleksi "Lex" Kilpinen on January 23, 2021, 11:47:03 AM
So, what have you done so far?
Are you simply moving the forum from one folder to another, or changing hosts?
Title: Re: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 23, 2021, 11:56:53 AM
One folder to another.  I manually changed $boarddir and $sourcedir and $cachedir in settings.php. I also copied my database and added in the proper user for the db. I changed the name of the databes in settings.php alos. Still when I go to run repair_settings.php I get the "Value not found!" errors for Tasks Directory, Packages Directory, Cache System, Enable Caching, and Memcache Servers.
Title: Re: SMF 2.0.x repair_settings download
Post by: Aleksi "Lex" Kilpinen on January 23, 2021, 11:59:48 AM
Most commonly, you would just move the files and run repair_settings. Usually you don't need to touch the db, or do any manual editing to files if you are simply going from one folder to another within the same domain.
Double check your DB credentials, and the contents of that DB. 
Title: Re: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 23, 2021, 12:11:16 PM
I did just notice at the top of the page I am getting this:

Some settings are not being shown because the database connection information is incorrect.
Check your database login details, table prefix and that the database actually contains your SMF tables.

I originally did it the way you said it should be done with the same errors. I've ran repair_settings many times over the years and have never seen this issue before.

But the database connection is the same as the other location which is working fine. I only have one db user and I made sure the database login is the exact same as it is in the other location. I only copied the database because I was getting this same error trying to use the same database.

The one thing that I don't think I've ever noticed before is the error for "Tasks Directory". I can't remember ever seeing anything about Tasks Directory.

Contents as well as the prefix for the database all look fine.
Title: Re: SMF 2.0.x repair_settings download
Post by: Aleksi "Lex" Kilpinen on January 23, 2021, 12:12:30 PM
Quote from: b4pjoe on January 23, 2021, 12:11:16 PM
I did just notice at the top of the page I am getting this:

Some settings are not being shown because the database connection information is incorrect.
Check your database login details, table prefix and that the database actually contains your SMF tables.
This would confirm my suspicion that something isn't right with the DB connection.
Title: Re: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 23, 2021, 12:55:32 PM
This site is not mine but one I'm trying to move for someone else so I'm not 100% sure what has been done in the past. At the moment it is in a forums folder that is in a Joomla 2.5.28 folder and they are wanting to do away with the Joomla portion of it. The forum works fine the forums folder as does repair_settings.php but when copying the contents of the forums folder to its own folder and not manually changing anything in settings.php and running repair_settings.php I get the above errors.

Joomla and SMF are using different databases and I don't see anything in either that looks like they were ever bridged together.
Title: Re: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 23, 2021, 11:53:51 PM
Turns out the issue was the new location I was trying to move it to was using PHP 5.3 and the SMF version was SMF 14 which requires PHP 5.4.
Title: Re: SMF 2.0.x repair_settings download
Post by: Aleksi "Lex" Kilpinen on January 24, 2021, 03:19:12 AM
Quote from: b4pjoe on January 23, 2021, 11:53:51 PM
Turns out the issue was the new location I was trying to move it to was using PHP 5.3 and the SMF version was SMF 14 which requires PHP 5.4.
Nice to hear that you figured it out, I probably wouldn't have thought to check that based on the info in this topic to be honest.
Title: Re: SMF 2.0.x repair_settings download
Post by: b4pjoe on January 24, 2021, 11:07:50 AM
Yeah I never associated it with the PHP version until somewhere along the way I got an error message the my version of MySQL was not compatible for what I was trying to do. Once I got PHP updated everything started working.

(Edit from above post: my SMF version was SMF 2.0.14 Not SMF 14) :)
Title: Re: SMF 2.0.x repair_settings download
Post by: jeepwrangler2k on May 14, 2021, 06:14:24 PM
I FTP'ed the repair_settings.php file into my root directory on my host server (Hostgator) and I see it on the server through the Host control panel but when I try running it via my website https://website.com/repair_settings.php I get the following error:

Sorry, this page doesn't exist.
Please check the URL or go back a page.

Any ideas?
Title: Re: SMF 2.0.x repair_settings download
Post by: Sir Osis of Liver on May 14, 2021, 09:33:22 PM
Hostgator is pretty bad, but they're not that bad.  Either file isn't there or link is incorrect.  Is it in /public_html?
Title: Re: SMF 2.0.x repair_settings download
Post by: jeepwrangler2k on May 14, 2021, 11:56:26 PM
It was in the root as specified by the docs but putting it in the public_html folder did the trick.

Thank you very much.
Title: Re: SMF 2.0.x repair_settings download
Post by: Sir Osis of Liver on May 14, 2021, 11:58:42 PM
Don't know how it's explained in the docs (too lazy busy to look), but it's supposed to go in forum root and run with forum url.
Title: Re: SMF 2.0.x repair_settings download
Post by: Aleksi "Lex" Kilpinen on May 15, 2021, 12:25:34 AM
Quote from: jeepwrangler2k on May 14, 2021, 11:56:26 PM
It was in the root as specified by the docs but putting it in the public_html folder did the trick.

Thank you very much.
I guess this might be a bit of a misunderstanding due to the terminology used.
Commonly root folder in hosting will mean the first public folder in the path, in your case public_html,
whereas with any web application usually root folder means the first folder of the app install in the path, which could also be public_html or a folder inside it.