News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Strange results with repair_settings.php

Started by sbartelski, April 05, 2024, 10:11:47 AM

Previous topic - Next topic

sbartelski

I will try to keep the description of this fairly complex issue as succinct as possible. If too short feel free to ask the necessary questions.

I make a backup of a copy of my forums (using Akeeba Solo).
I restore the backup on a different site, technically the same server but a different sub-domain (using Akeeba Kickstart). The databases for the source and the target forums are on the same server but have different names.
The restore is successful but obviously the settings need adjustment, so I run repair_settings.php in the target sub-domain. Repair Settings sees all (most of?) the changes required, so I select the suggested changes for each field.
N.B. There are two settings that do NOT have a suggested change, the ones for Custom avatars (URL & Directory), why is this?
I save the repair settings and exit the tool. The new test forum works and is a complete copy of the source BUT...
When I go back to the source forum many of the URL/directory settings have been changed to the sub-domain of the target, test, forum.

Strange, right?
Stefan Bartelski
Stefan Bartelski
Webmaster for the Cadillac LaSalle Discussion forums

Aleksi "Lex" Kilpinen

Not at all, you should update database connection settings first, save, reload, update all the rest, save, profit.

This is because some settings are in the database, and you can only see/update them after you have a working DB connection.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sbartelski

Quote from: Aleksi "Lex" Kilpinen on April 05, 2024, 10:39:27 AMNot at all, you should update database connection settings first, save, reload, update all the rest, save, profit.

This is because some settings are in the database, and you can only see/update them after you have a working DB connection.
Thanks, sounds logical, maybe I should have thought of that. Or perhaps, whoever wrote repair_settings.php could add a text to alert noobs that that is how they work the changes when you move to a different server or directory.
Stefan Bartelski
Webmaster for the Cadillac LaSalle Discussion forums

Aleksi "Lex" Kilpinen

That is valid feedback, I would actually agree a small note inside the tool might be a good idea.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

grega

> update database connection settings first, save, reload....

Perhaps the tool should do this natively, in case that the database connection is not working at the first start?

sbartelski

Quote from: grega on April 06, 2024, 09:09:08 AM> update database connection settings first, save, reload....

Perhaps the tool should do this natively, in case that the database connection is not working at the first start?

The database connection is still working, because it goes to the source (old) version of the database. So I do not think that test would work.
Stefan Bartelski
Webmaster for the Cadillac LaSalle Discussion forums

shawnb61

#6
The old db connection information comes from Settings.php.  There is no need for db access to display the first screen.

FYI, the banner across the top already tells you if/when your DB connection is OK. 

And only after it's OK, can it display the path/url info that is stored in the DB.

It can offer suggestions & make pretty good guesses, but at the end of the day, it is up to the admin to carefully review the paths & urls & confirm they are correct.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: