Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Snow-Man on March 24, 2023, 12:31:29 PM

Title: Question about repair_settings.php
Post by: Snow-Man on March 24, 2023, 12:31:29 PM
hello guys,
i have uploaded repair_settings.php and was going to fix some settings but i show that didnt get all settings, just got few of them not all
how can i get all settings?
Title: Re: Question about repair_settings.php
Post by: Kindred on March 24, 2023, 12:42:20 PM
can you be more specific?   what is missing?

Remember, repair_settings.php pulls the database connection information and base-directory information from Settings.php and then pulls the avatar, smileys, attachments and themes information from the database.

if
a) your db connection information is not correct - then you need to correct that and save.  Once it's correct, repair_settings should be able to pull the info from the database.
b) your Settings.php is in some sort of incompatible format or is missing the setting entirely and repair_settings can't find the setting.
Title: Re: Question about repair_settings.php
Post by: Sir Osis of Liver on March 24, 2023, 12:43:06 PM
If repair_settings is not displaying theme paths, you'll have to fix them manually in database table _themes.  That's what happened with your 1.1 database, don't know why.
Title: Re: Question about repair_settings.php
Post by: Snow-Man on March 24, 2023, 01:04:11 PM
it doesnt display attachments path for example, it displays the half of paths
Title: Re: Question about repair_settings.php
Post by: Sir Osis of Liver on March 24, 2023, 01:09:49 PM
Attachments, avatars, and smileys paths are in _settings table, you can edit them manually.
Title: Re: Question about repair_settings.php
Post by: Snow-Man on March 24, 2023, 01:11:59 PM
Quote from: Sir Osis of Liver on March 24, 2023, 01:09:49 PMAttachments, avatars, and smileys paths are in _settings table, you can edit them manually.

Yes, im trying to attach them through repair_settings.php but didnt see that on settings.
was going to fix that on the forum but says page doesnt exist
Title: Re: Question about repair_settings.php
Post by: Kindred on March 24, 2023, 02:58:04 PM
Based on your other thread, it seems that you caused this by attempting to upgrade piecemeal...

I suggest that you revert to your previous install and then do the upgrade the right way instead of trying to fix all your mistakes with patching plaster after the fact
Title: Re: Question about repair_settings.php
Post by: nc3man on March 24, 2023, 05:20:35 PM
I also have made the mistake of upgrading incorrectly, so that previous attachments and agreement.txt were not properly located. As @Kindred advises, follow the upgrade instructions, especially if we're talking a large upgrade here. https://wiki.simplemachines.org/smf/Upgrading. I made the mistake of doing more of a clean install once instead of dropping the large upgrade files directly onto the working installation and letting them overwrite. I also recovered from that by starting over with a backup and more carefully following the instructions. Its easy to make mistakes, but you can recover. It pays to be patient.

Before using repair_settings.php, I highly recommend reading the excellent documentation which is not mentioned in the file or easily located on this site (for me anyway) https://wiki.simplemachines.org/smf/Repair_settings.php
Title: Re: Question about repair_settings.php
Post by: Snow-Man on March 24, 2023, 05:29:58 PM
Quote from: nc3man on March 24, 2023, 05:20:35 PMI also have made the mistake of upgrading incorrectly, so that previous attachments and agreement.txt were not properly located. As @Kindred advises, follow the upgrade instructions, especially if we're talking a large upgrade here. https://wiki.simplemachines.org/smf/Upgrading. I made the mistake of doing more of a clean install once instead of dropping the large upgrade files directly onto the working installation and letting them overwrite. I also recovered from that by starting over with a backup and more carefully following the instructions. Its easy to make mistakes, but you can recover. It pays to be patient.

Before using repair_settings.php, I highly recommend reading the excellent documentation which is not mentioned in the file or easily located on this site (for me anyway) https://wiki.simplemachines.org/smf/Repair_settings.php
already have repair_settings.php on pc and i have used it before so many times but this time that happened to me without editing that php file.
don't think the problem on repair_settings.php
Title: Re: Question about repair_settings.php
Post by: nc3man on March 24, 2023, 06:23:57 PM
My comment had nothing to do with editing repair_settings.php. Sounds like you just need to wipe out your current botched setup, restore your backed up files and database, make sure that's working as the old version, follow the upgrade instructions carefully, and only use repair_settings.php at the end if necessary.
Title: Re: Question about repair_settings.php
Post by: Snow-Man on March 24, 2023, 06:30:03 PM
Quote from: nc3man on March 24, 2023, 06:23:57 PMMy comment had nothing to do with editing repair_settings.php. Sounds like you just need to wipe out your current botched setup, restore your backed up files and database, make sure that's working as the old version, follow the upgrade instructions carefully, and only use repair_settings.php at the end if necessary.
i have got all settings fields again. i set everything as recommended but i saw Exports Directory field is empty is it important to fill it too because it doesnt have anything as recommendation
Title: Re: Question about repair_settings.php
Post by: nc3man on March 24, 2023, 06:48:11 PM
Well, the "Exports Directory" should be set to your SMF_path/exports, where SMF_path is the same for the other directories. The field export_dir was not in the database settings in SMF 1.1 or 2.0 so perhaps that is why it is not specified. I have not run repair_settings.php on a version that old. You might just fill that in on your own. On the other hand, repair_settings does a pretty good job at recommendation guessing, so I'm surprised it can't put SMF_path/exports as a really good guess. What was your starting version prior to your upgrade?
Title: Re: Question about repair_settings.php
Post by: nc3man on March 24, 2023, 07:09:49 PM
I see from another topic, you started from a 2.0.19 backup. Good.
What version of repair_settings do you have? The header in the file should match
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2022 Simple Machines
 * @license https://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.1.3
 * @updated 2022-01-15
 */
If that's all it is, just go to https://wiki.simplemachines.org/smf/Repair_settings.php and download from there.