Repair_settings.php vs Load.php

Started by LiroyvH, November 03, 2013, 11:02:33 PM

Previous topic - Next topic

LiroyvH

It appears that repair_settings.php requires Sources/Load.php to work.
Whilst that's not an issue per se, it is an issue when you move SMF to a completely new directory (eg: from "site.com/smf" to "site.com/forum").

Repair_settings.php will throw a require_once error that it cannot access Load.php and dies, making it completely unusable.
Changing the associated variables in Settings.php ($boarddir, $sourcedir, $cachedir) fixes the issue.

However, considering this is meant to be a easy to use tool to fix all kinds of Setting issues, it would help if, should Load.php be inaccessible, that the user can define (and/or let repair_settings attempt to find/guess) the completely new basedir in order to fix any other issues that would normally require repair_settings to be ran.

--githoob: https://github.com/SimpleMachines/tools/issues/5
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

MrPhil

Yes, kind of a chicken-and-egg type thing. If Settings.php needs to be pointing to the right base directory in the first place before repair_settings can be run to update Settings.php to the right base directory...

Surely repair_settings could do some basic checking on the base directory (and database settings) and get the user to correct them before doing any requires or includes that count on these basic settings? Don't try guessing the base directory -- ask the user for it, possibly offering several possibilities to choose from. Your average forum owner is going to have no idea where things are, so guide them as much as possible.

Arantor

Since it's on Github and all tracking should be done there, I'm moving this to resolved.

Advertisement: