Snap Nextcloud Upgrade from 16 to 19 occ Upgrade not Possible because php command not found

I tried to Follow the Tutorial That didn’t change ever since Versions even below 15.
I once installed nextcloud via snap by snap install nextcloud.
It installed Nextcloudb 16 at that time.
Here is the Docu that didn’t change for any major release.
…/15/…
https://docs.nextcloud.com/server/16/admin_manual/maintenance/package_upgrade.html
…/17/…
…/18/…
…/19/…

It Says I should run

sudo snap refresh nextcloud

so I did and it went through without any errors. It Upgraded to Nextcloud 19 for me.

But then, the Second Command just don’t work and I just couldn’t find anything to this online despite hours of research I’m done with my nerves.
It Says:

sudo -u www-data php occ upgrade

but I’m getting the Error PHP: command not found.
I don’t get it, how does nextcloud have even functioned before without PHP? and what is this occ stuff even? never heard off it as far as I can remember.

And I thought Updating and maintaining snap is easier but if the documentation always is wrong… I just can’t understand what’s so difficult to write a correct Wiki/HowTo For once.

So Please could someone help me? I really really don’t want to lose all my data on this nextcloud instance and i simply don’t know what to do and can’t find anything olnine. I just don’t know what i’m doing wrong constantly…

Additinal Info:
uname -a

Linux cloud 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux

updatedb

command not found

php -v

command not found

locate /owncloud/occ

locate /nextcloud/occ

root@cloud /snap/nextcloud/current/bin # ls
ab mysql_upgrade
apxs mysqlxtest
certbot nextcloud-cron
chardetect nextcloud-fixer
checkgid occ
dbmmanage pasteurize
delay-on-failure pbr
disable-https pear
enable-https peardev
export-data pecl
fcgistarter php
futurize php-config
htcacheclean php-fpm
htdbm phpize
htdigest redis-benchmark
htpasswd redis-check-aof
httpd redis-check-rdb
httpd-wrapper redis-cli
httxt2dbm redis-sentinel
import-data redis-server
jws renew-certs
logresolve restart-apache
manual-install rotatelogs
mdns-publisher run-httpd
my_print_defaults run-mysql
mysql run-mysqldump
mysqlcheck run-php
mysqld setup-nextcloud
mysqld_safe start_mysql
mysqldump start-php-fpm
mysqldumpslow start-redis-server
root@cloud /snap/nextcloud/current/bin # sudo -u www-data php occ upgrade
sudo: php: command not found

is someone here at all?

i cant even open up an issue on github… it just wont let me…

Hi,

Upgrading between major versions isn’t allowed. You need to upgrade bewteen one version at the time, so in your case 15 --> 16 --> 17 --> 18 --> 19.

In the Nextcloud VM it would be possible to go that path, but I’m not sure about the snap.