Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Illori on August 25, 2018, 02:18:37 PM

Title: repair_settings.php php 7.0 SMF 1.1
Post by: Illori on August 25, 2018, 02:18:37 PM
seems that the version of repair_settings.php found on github does not seem to work correctly with php 7 if the SMF version is 1.1. i am trying to upgrade and keep getting errors about mysql calls in the repair_settings.php file. since the forum is changing servers we need to do the upgrade on the new one if at all possible but the paths need to be fixed first.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Kindred on August 26, 2018, 11:14:38 AM
since SMF 1.1.x doesn't work on php 7 any way - why?
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Illori on August 26, 2018, 12:39:07 PM
made it hard to get the forum working on the new server as SMF 2.0.15 would not work on the old server.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Antes on October 30, 2018, 04:28:14 PM
Quote from: Kindred on August 26, 2018, 11:14:38 AM
since SMF 1.1.x doesn't work on php 7 any way - why?

I agree, this does not require any action from development side. Simply user needs to downgrade the php version for temporary and do fixing/upgrade and move back to php7.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: live627 on October 30, 2018, 06:22:21 PM
Don't the tools use $smcFunc?
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Sir Osis of Liver on October 30, 2018, 06:55:03 PM
Quote from: Antes on October 30, 2018, 04:28:14 PM
user needs to downgrade the php version for temporary and do fixing/upgrade and move back to php7.

I've had to do this several times upgrading early 1.1 forums, downgrade php, upgrade forum and php in steps.  Seems to vary with server, but upgrader and repair_settings are sometimes both affected.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Antes on October 30, 2018, 09:32:55 PM
Quote from: live627 on October 30, 2018, 06:22:21 PM
Don't the tools use $smcFunc?

isn't repair_settings also depends on SMF's core functions as well ? If so 1.1 has no mysqli support (no expert).

Quote from: Sir Osis of Liver on October 30, 2018, 06:55:03 PM
Quote from: Antes on October 30, 2018, 04:28:14 PM
user needs to downgrade the php version for temporary and do fixing/upgrade and move back to php7.

I've had to do this several times upgrading early 1.1 forums, downgrade php, upgrade forum and php in steps.  Seems to vary with server, but upgrader and repair_settings are sometimes both affected.


Well, the things is development cannot do everything for others, management already pointed out that SMF 1.x is not going to get any compat patch towards the new tech so people who stayed on 1.x should take care of their future.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Illori on October 31, 2018, 05:11:35 AM
right but if they cant get upgraded easily due to our tools not working that does not exactly leave a good taste in their mouth.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Sir Osis of Liver on October 31, 2018, 12:08:46 PM
'Easily' being a relative term.  Many (most?) forum owners have no idea how the upgrade process works, or why it fails, and they shouldn't have to.  If it doesn't work, they blame the software.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Illori on October 31, 2018, 12:11:29 PM
I mean, to move the forum to a new host that you cant change the php version you should NOT need to edit the database to get things up and running as repair_settings.php fails to work.
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: Sir Osis of Liver on October 31, 2018, 12:24:24 PM
Unfortunately, there's so much variation in server configurations it's pretty much impossible to get everything to work everywhere.  I've worked several forums (at least two on GoDaddy) that could not be upgraded in place.  Had to export database, upgrade it on my server, then move it back.  You also have the problem of very old forums running early 1.1.x that have never upgraded, and are in a panic because it stops working.  That's why there's a support forum, but sometimes it's impossible to talk them through it, and you have to get into their host and do it for them.

Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: shawnb61 on November 09, 2019, 05:24:26 PM
I agree with Illori that this needs to be easier.  I've done some testing & confirmed the issue.

The basic problem is that there is a different approach to loading up smcFunc for 1.x (subs_db_mysql, etc., didn't exist then...)  So repair_settings.php has special compatibility logic for 1.x.  But...  That special compatibility logic only supports mysql calls (not mysqli), so won't work in php7. 

Logged here:
https://github.com/SimpleMachines/tools/issues/33

If we really really want folks to upgrade, it needs to be easier than this. 

The 2.0.16 changes should hopefully make 1.x => 2.x upgrades much smoother. 
Title: Re: repair_settings.php php 7.0 SMF 1.1
Post by: shawnb61 on December 03, 2019, 07:16:37 PM
This has been fixed & the new version of repair_settings.php is available for download. 

Note the 1.1 logic previously errored out whenever the db credentials or prefix were incorrect.  This has been corrected as well.