Author Topic: using repair_settings.php and getting an error I cant work through  (Read 187 times)

Offline grizz (used to be 3i, now it's ~FS~)

  • Semi-Newbie
  • *
  • Posts: 11
SMF 2.0.15
Tiny Portal 1.3

settings.php and settings_bak.php both found to be blank after being notified that site was down.

I have checked and double checked that I have to correct database, correct user, correct password (after changing password as I had forgotten&lost it)
when I save settings, it goes blank and in red dashed box at top of page says:
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.

At the top of the page, above the banner, its says:
Notice: Undefined offset: 0 in /home/g47jzsy5hsz3/public_html/FS-main/repair_settings.php on line 1020

I have opened repair_settings.php and this is line 1020:
   fwrite($fp, $settingsArray[$i]);

I am unaware of what to do, I have searched through several pages of settings.php blank problems and not found anything like this.
I have googled and read through problems on other sites as well.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,809
  • We were all equal in the end.
Re: using repair_settings.php and getting an error I cant work through
« Reply #1 on: November 21, 2020, 09:22:07 PM »
It's a known bug triggered by race condition on server.  You have to restore backup of Settings.php or manually edit the file with correct database credentials.
« Last Edit: November 21, 2020, 10:12:03 PM by Sir Osis of Liver »
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns