CLI Update Help

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

CLI Update Help

Post by Melshimber »

Hiya

My host has reduced the time out settings on scripts so I can't run the database upgrade at the moment so I am trying to upgrade using the CLI via Terminal on MacOS X. I can log into my server okay but when I run the script it returns an parsing error and I think this is because the SSH is using PHP 4.4.9 as a default.

PHP 7.3 is installed on the host because I use if for my website and when using the 'whereis php' command I can find these folders for PHP 7.3. Note: there are other versions but these are the only 'version agnostic' or 7.3 related folders the command reports.
/usr/bin/php
/usr/local/bin/php
/usr/share/php
/usr/bin/php7.3-cli
/usr/bin/php7.3
/usr/lib/php7.3
/etc/php7.3
/usr/local/bin/php7.3
/usr/include/php7.3
My question is - can I force the SSH to run a different version of PHP; and if so what command line do I need to use in Terminal? I am not really very good at code so I am treating some of my internet searches with a bit of suspicion!

Any help would be appreciated I am at a bit of a dead end with the host who are refusing to help any further. At the moment by camera club website is offline stuck in the upgrade process. :?

Best

M
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: CLI Update Help

Post by 3Di »

Try first alias php='/usr/bin/php7.3-cli'

Re login and do php -v to check it.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you! ๐Ÿš€
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 1002
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: CLI Update Help

Post by AbaddonOrmuz »

You could also simply use php7.3 or php7.3-cli instead of just php when executing the CLI tool.

Code: Select all

php7.3 install/phpbbcli.php update update-config.yml
# or
php7.3 phpbbcli.php db:migrate --safe-mode
The executable should match the one inside (among other paths) /usr/bin
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

3Di wrote: โ†‘
Tue Apr 28, 2020 7:54 am
Try first alias php='/usr/bin/php7.3-cli'

Re login and do php -v to check it.
Hiya - that worked great! Managed to get the php -v to return 7.3,

I now get an error - '[ERROR] Unable to access file update-config.yml'

It is saved in the phpBB3/install folder is that the right location?

I am guessing that I don't need to assign any special file permissions to the file. . .
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: CLI Update Help

Post by 3Di »

php install/phpbbcli.php update install/update-config.yml
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you! ๐Ÿš€
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

3Di wrote: โ†‘
Tue Apr 28, 2020 9:41 pm
php install/phpbbcli.php update install/update-config.yml
Hiya, thanks for your help; it's really appreciated.

I have the software in a bespoke folder so I tweaked it slightly as

php adapsuk.org/phpBB3/install/phpbbcli.php update update-config.yml

When I run this command I then get this error. . . . as the attachment below.

The code in the update file says:

updater:
type: db_only


Which I think will just update the database (which is the last step in the install process I need to complete).

Any ideas what the error could be? It's not really very informative. . .

Do you think that using the cd command to go to the phpbb directory would help?

Best

M
Attachments
Screenshot 2020-04-29 at 08.14.16.png
Screenshot 2020-04-29 at 08.17.23.png
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: CLI Update Help

Post by 3Di »

php adapsuk.org/phpBB3/install/phpbbcli.php update adapsuk.org/phpBB3/install/update-config.yml

Put update-config.yml into the install folder.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you! ๐Ÿš€
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

*sigh*

Tried using cd to go to the forum folder and got a bit further. . . now reading this error. I really wish I knew what I was doing! lols. :lol:

I have never changed the config file so I don't really know where to go from here. I checked the passwords saved in the file etc and it all seems okay to me.

Feels like this is so close to being resolved but so far away too! Bit nervous about posting an image of the config settings even after I have blocked out the usernames/ passwords etc.
Attachments
Screenshot 2020-04-29 at 08.23.13.png
Last edited by Melshimber on Wed Apr 29, 2020 7:28 am, edited 1 time in total.
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: CLI Update Help

Post by 3Di »

Post here within BBcode CODE tags that file (update-config.yml)
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you! ๐Ÿš€
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

Code: Select all

updater:
    type: db_only
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: CLI Update Help

Post by 3Di »

BTW, if you are just to update your DB that's it - (spaces not tabs)

Code: Select all

updater:
    type: db_only
    extensions: []
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you! ๐Ÿš€
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

Hiya

I had updated the files and just wanted to update the database, now getting a different error. As the attached.

I tried adding the extension note to the file and it seemed to go further along the upgrade process.

M

PS Added the error and then line 83 from the update file.
Attachments
Screenshot 2020-04-29 at 08.40.05.png
Screenshot 2020-04-29 at 08.39.38.png
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

Probably doesn't help that I started the update with the installer via web browser and got stuck on the update database step because of a host limitation on the script execution time.

M
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: CLI Update Help

Post by 3Di »

Man, you really should have stated in your topic starter the steps you made before to reach this stage, indeed.

Fill out the SRT and start again.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you! ๐Ÿš€
Melshimber
Registered User
Posts: 55
Joined: Sun Jul 10, 2005 9:27 am

Re: CLI Update Help

Post by Melshimber »

SRT? Sorry I donโ€™t get that acronym.

Do you mean start the update process again or a new forum topic?

How would I start the update sequence again?

M
Post Reply

Return to โ€œ[3.3.x] Support Forumโ€