Using occ on 1&1 IONOS Hosting (a shared server; guidance for Linux dummies :) )

Field report on 1&1 Hosting:

It is possible and easy to install and “normally run” Nextcloud on an 1&1 (now: “1&1 IONOS”) Hosting site.

But in some maintenance cases, it might get necessary to use the command line tool occ.

Up to now, I always failed to run occ, now knowing (thanks, diri!!!) due to a simple and silly mistake:

On the ssh command line I typed in

$ php occ …

and received an fatal error, ignoring the fact that the php error message returned valuable informations like ‘php 4.4.9…’.

Indeed, on this server, ssh by default uses this outdated php 4 version, independently of its PHP settings in the control center!!

Solution: Easily call occ with a more actual PHP version, e.g.

$ php7.1-cli occ …

Works well on my server!

2 Likes

Thanks fy99. That was a good hint for me, but nethertheless I tried unsuccesfull the occ commands with the SSH enviroment at 1&1 IONOS.

For all those, who have maybe also the problem: The composer Add-On is not installed by default.

You have to load the Composer to your Webspace like this:

curl -sS https://getcomposer.org/installer | /usr/bin/php7.1-cli

The complete documentation to use the Composer is here:

After that step you can jump into the nextcloud data directory and put in " **php7.1-cli occ (…)"