Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: LiroyvH on November 03, 2013, 11:02:33 PM

Title: Repair_settings.php vs Load.php
Post by: LiroyvH on November 03, 2013, 11:02:33 PM
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
Title: Re: Repair_settings.php vs Load.php
Post by: MrPhil on November 04, 2013, 09:44:23 AM
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.
Title: Re: Repair_settings.php vs Load.php
Post by: Arantor on February 09, 2014, 01:24:33 AM
Since it's on Github and all tracking should be done there, I'm moving this to resolved.