Skip to main content
Topic: Repair settings doesn't work (Read 5354 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Repair settings doesn't work

I've downloaded the latest repair_settings.php from GitHub and the following error welcomes me to fixing my paths:

Code: [Select]
Fatal error: Uncaught Error: Call to undefined function database() in C:\xampp\htdocs\sc\forum\repair_settings.php:122 Stack trace: #0 C:\xampp\htdocs\sc\forum\repair_settings.php(37): action_show_settings() #1 {main} thrown in C:\xampp\htdocs\sc\forum\repair_settings.php on line 122

I know that I can fix the paths myself, but what if someone's forum needs fixing paths and the tool itself isn't working.

Line 122:
Code: [Select]
$db = database();

The connection to database is working (the forum loads and operates fine, localhost xampp). There is no password for the database user, perhaps that's an issue with addition to localhost?



I managed to fix it by changing paths in Settings.php to closest as they should look, after that the tool started working and is able to fix all the paths. A little weird though that it wouldn't work straight out of the box.
Last Edit: June 04, 2016, 08:24:00 am by CrimeS
http://studiocrimes.com - Premium & Free SMF/ElkArte Themes

Re: Repair settings doesn't work

Reply #1

 emanuele feels repair_settings has not been touched in ages... ::)
Bugs creator.
Features destroyer.
Template killer.

Re: Repair settings doesn't work

Reply #2

So far it is working for me all the time (except for languages path).

Re: Repair settings doesn't work

Reply #3

I feel it doesn't work if it cannot find a working database connection.
Bugs creator.
Features destroyer.
Template killer.

Re: Repair settings doesn't work

Reply #4

Had exactly that problem the other day.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Repair settings doesn't work

Reply #5

I already updated some of the code and now attempting to upgrade it based on the code here, if possible. The reason is it is not working for me for 1.1 and it might be useful for other 1.1 users, especially when upgrading may cause some errors which requires some settings to be fixed etc.

I have done it half way, and will continue after further this but I intend to attach it here just in case I got busy or somehow forget to continue with it. Note that this is NOT finished.

There is some note on whether to delete or modify some of the code as they made it for three version while we only have two. Whatever are already good from current version are re-used into this new version.

elk_settings_fixer.php

Re: Repair settings doesn't work

Reply #6

Thanks for this.  It will be helpful for sure!

Repair settings languages path

Reply #7

Quote from: ahrasis – So far it is working for me all the time (except for languages path).
@ahrasis thank you so much
regarding the above error you mentioned as quoted , it still happening for me
Clipboard014.png
 so is there any info about the reason for it , how to fix manually until the tool get some last fix , or if this error is fake and not affecting the forum at all since the folder exist and the language is fine ?
thank you again  :)

Re: Repair settings doesn't work

Reply #8

@ahrasis why did you start with the SMF version of the tool and not the ElkArte 1.0 version http://tools.elkarte.net/2014/12/repair_settings/

Are there some new features that need to be added or was it just that broken on 1.1 or am I just misunderstanding?



Re: Repair settings doesn't work

Reply #9

No. I merely suggested it and I am still using EA version but I just was looking if there is a new thing that could be useful to us especially the version recognition as far EA repair can only work on 1.0 but not 1.1. So may be, instead of creating a new file for it, just use something similar to check the version before we proceed.

Besides, my PR is the EA version right? If not I am might be posting a wrong file then. :(

Re: Repair settings doesn't work

Reply #10

Your PR's have been to the correct file  :)   I just wanted to make sure I was not missing something.  It looks like a couple of things have been added that may be indeed be useful that we should consider.

Re: Repair settings doesn't work

Reply #11

Here is an updated version  repair_settings.php  (41.07 KB) which should work on 1.0.x and 1.1

And a minor update since I used the wrong case on a directory :(

Last Edit: February 14, 2017, 02:23:37 pm by Spuds

Re: Repair settings doesn't work

Reply #12

Great work there @Spuds. It is working great so far for in my 1.0 and 1.1. Good looking UI, better than.

Only one thing I tried didn't work for 1.0.x that is enabling the cache. I think it will go back to off though you have selected on and save.

Re: Repair settings doesn't work

Reply #13

Thanks :D ... I'll take a look at the cache issue.

 

Re: Repair settings doesn't work

Reply #14

First , thank you @Spuds for a great job
tried it on my xampp localhost test forum , i have already downloaded it from my test live site with the older paths
The tool kept giving error on start about wrong sources path
nothing worked until i manually changed ONLY the sources path to the local one
Code: [Select]
D:\xampp\htdocs\elkarte\sources

and the tool worked just fine for me,

I can also confirm the cache setting problem mentioned by @ahrasis  , its always ON in my case
switching OFF and saving doesn't change it .

thank you all for keeping this tool improving

Edited to mention that the version is ElkArte 1.0.9