Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: grizz (used to be 3i, now it's ~FS~) on November 21, 2020, 08:39:02 PM

Title: using repair_settings.php and getting an error I cant work through
Post by: grizz (used to be 3i, now it's ~FS~) on November 21, 2020, 08:39:02 PM
hi,
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:
QuoteSome 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:
QuoteNotice: 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.
Title: Re: using repair_settings.php and getting an error I cant work through
Post by: Sir Osis of Liver 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.