repair_settings.php php 7.0 SMF 1.1

Started by Illori, August 25, 2018, 02:18:37 PM

Previous topic - Next topic

Illori

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.

Kindred

since SMF 1.1.x doesn't work on php 7 any way - why?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

made it hard to get the forum working on the new server as SMF 2.0.15 would not work on the old server.

Antes

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.

live627


Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antes

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.

Illori

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.

Sir Osis of Liver

'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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

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.

Sir Osis of Liver

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.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

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. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

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. 

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: