Nextcloud - php version error running occ command

nextcloud

(Charles) #1

NethServer Version: NethServer release 7.5.1804 (beta)
Nextcloud Version 13.02

I’m getting sync errors from my Nextcloud desktop app on one of my servers. The error is:

server replied: Service unavailable

Researching I’ve found a forum post on Nextcloud forms suggesting to rebuild my file cache using the following command:

sudo -u www-data ./occ files:scan --all

Obviously this won’t work for Nextcloud on Nethserver so I modified the command like so:

sudo -u apache /usr/share/nextcloud/occ files:scan --all

When I run the above command I receive the following error:

This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.

Does anyone have ideas on how I can either:

Fix my service unavailable error and is this related to file cache in Nextcloud?
Fix my error running occ with regards to the version of PHP I’m using on Nethsever/Nextcloud?

Thank you.


(Charles) #2

Ok…I should have searched harder… @dnutan had what I needed in another post.

I can use:

sudo -u apache /opt/rh/rh-php56/root/usr/bin/php /usr/share/nextcloud/occ files:scan --all

And this command does not give me the PHP error.

Now I’ll see if by running this command I fix my sync errors from the Nextcloud Desktop sync client. :slight_smile:


(Marc) #3

5.6 shall work but NethServer’s php version for Nextcloud 13 is php7.1

http://docs.nethserver.org/projects/nethserver-devel/en/v7/nethserver-nextcloud.html#occ

https://wiki.nethserver.org/doku.php?id=howto:nextcloud


(Charles) #4

Thank you @dnutan for this follow-up. The following is the instruction I should have used based on the wiki:

sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ