News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

is php upgrade.php without interactive shell possible?

Started by klausp45, August 07, 2023, 01:07:19 PM

Previous topic - Next topic

klausp45

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.

Aleksi "Lex" Kilpinen

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
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

It's not necessary to run upgrade.php if you're installing upgrades with package manager.
When in Emor, do as the Snamors.
                              - D. Lister

Doug Heffernan

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.

Kindred

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
Сл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."

klausp45

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.

Kindred

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.
Сл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."

klausp45

@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.


klausp45

Maybe I should add the information. Our forum has 500 000 posts in 31 000 topics from 11 000 users.

Kindred

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...
Сл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."

Advertisement: