Not able to execute occ command on Synology

synology

#1
  1. Install nextcloud on Webstation/Synology
  2. Try to execute ssh command
    sudo -u http php /volume1/web/nextcloud/occ status

Actual behaviour

When executing the occ status command or any other occ command, i am getting the following error message:

An unhandled exception has been thrown:
exception ‘Exception’ with message ‘Environment not properly prepared.’ in /volume1/web/nextcloud/lib/private/Console/Application.php:145
Stack trace:
#0 /volume1/web/nextcloud/console.php(91): OC\Console\Application-loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /volume1/web/nextcloud/occ(11): require_once(’/volume1/web/ne…’)

With phpinfo i found out that my PHP user is http. Complete nextcloud folder is owned by http user.b

Server configuration

Operating system: Synology DSM newest version

Web server: Apache 2

Database: Sqlite3 12.0.0.29

PHP version: php5.6.11

Nextcloud version: nextcloud 12.0.0

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Hope you can help me with the error message


#2

Does Nextcloud web ui work on the other hand?

In case please show your config.php and webserver configs.


#3

I got it…Instead of using php you have to use php56 command on synology diskstations. Thanks anyways.


#4

Good to know :slight_smile: