Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: klausp45 on August 07, 2023, 01:07:19 PM

Title: is php upgrade.php without interactive shell possible?
Post by: klausp45 on August 07, 2023, 01:07:19 PM
Hi,
I am trying to update the smf-software from 2.1.2 to 2.1.4. My first step is to update to 2.1.3, using the patch smf_2-1-2-to-2-1-3_patch.tar.gz.

For some time now, upgrading my forum only works at ssh commandline using "php -e -a upgrade.php". (Using the paketmanager or using upgrade.php in browser doesn't work.)

After upgrading php to version 8.1.21, I get the error-message:
"Interactive shell (-a) requires the readline extension."

Without the -a parameter for the interactive shell nothing happens. My provider has the realine.so-php-extension installed but deactivated. I have not the permission to write to "/etc/php/8.1/conf.d/". So I can't activate it. Provider is watching, if he will do this.

My question is:
Is there another chance to upgrade via ssh-commandline? Can I use different parameters for php or do I miss something in my steps or is it the wrong proceeding?
I don't use the large upgrade, to not lose my modifications.
Thanks a lot for reading so far.
Title: Re: is php upgrade.php without interactive shell possible?
Post by: Aleksi "Lex" Kilpinen on August 07, 2023, 01:17:08 PM
I would be interested to know why doesn't it work through the browser? That is the way most people use it after all.  And patches should always be preferred over large upgrades really, less chances of something going wrong, less needless overwriting of files to mess customizations. You ONLY need the small patch files if you stay within 2.1.

But all I know of the CLI options really, is here https://wiki.simplemachines.org/smf/Upgrading#Upgrading_Using_the_Command_Line
Title: Re: is php upgrade.php without interactive shell possible?
Post by: Sir Osis of Liver on August 07, 2023, 01:19:10 PM
It's not necessary to run upgrade.php if you're installing upgrades with package manager.
Title: Re: is php upgrade.php without interactive shell possible?
Post by: Doug Heffernan on August 07, 2023, 01:44:09 PM
Quote from: klausp45 on August 07, 2023, 01:07:19 PMI don't use the large upgrade, to not lose my modifications.

You will not loose the modifications, you can re-install them again after the upgrade. Unless you have made manual edits to the files. Making a backup of all the edited files will ensure that those manual edits will not be lost either.
Title: Re: is php upgrade.php without interactive shell possible?
Post by: Kindred on August 07, 2023, 02:04:43 PM
the Large upgrade is the complete replacement -- use that to skip intervening steps...

if you're going from .2 to .4 -- then use the package manager to go to .3 and then again to go to .4

Using the command line **IS** using the "large upgrade" and *WILL* remove your mods (which can then be reinstalled)

... but it's not necessary to do that at all
Title: Re: is php upgrade.php without interactive shell possible?
Post by: klausp45 on August 07, 2023, 02:07:08 PM
Thank you for answering.
First of all I seem to used the wrong cli parameters.

Quote from: Aleksi "Lex" Kilpinen on August 07, 2023, 01:17:08 PMBut all I know of the CLI options really, is here https://wiki.simplemachines.org/smf/Upgrading#Upgrading_Using_the_Command_Line

With this help, I tried to use:
 php -f upgrade.php
This seems to solve my problem eith the commandlineerror-message. As I don't need the "-a" parameter.

I will update here soon, if it works ans answer the other questions. Still trying.
Title: Re: is php upgrade.php without interactive shell possible?
Post by: Kindred on August 07, 2023, 02:35:52 PM
I will repeat -- doing the commandline update with the large upgrade zip *WILL* remove your mods (if they have any file edits) and may remove mods which are hooks-only.
Title: Re: is php upgrade.php without interactive shell possible?
Post by: klausp45 on August 07, 2023, 05:17:42 PM
@Kindred: Thank you for pointing that out.
Of course everything is backuped, database and files.
The package-manager throws a lot of errors (tests failed) and I don't want to do the specific changes manually, where the tests failed.

Title: Re: is php upgrade.php without interactive shell possible?
Post by: klausp45 on August 08, 2023, 06:22:45 AM
Maybe I should add the information. Our forum has 500 000 posts in 31 000 topics from 11 000 users.
Title: Re: is php upgrade.php without interactive shell possible?
Post by: Kindred on August 08, 2023, 08:56:40 AM
Well, if you don't use the patch file in the package manager, then yes - you will have to reapply mods after upgrading....   but given that MOST mods for 2.1.x are hooks only, the failures in the auto-apply of the patch in the package manager means that either you are using (possibly outdated) mods which still make file edits -- or you have a lot of manual, personal edits...