[SOLVED] Error with Cloud rescan

I meet a problem with the command of rescan of the cloud.
Nextcloud is installed on my NAS Synology. I have the installed packages PhP5.6 and PhP7.0.
When I execute the command " php occ files:scan - all “, I obtain the following error message:
” with exception ’ Doctrine\DBAL\DBALException ’ message ’ Failed to connect to the database: the Year exception occured in driver: could not find driver ’ in/volume1/web/nextcloud/lib/private/DB/C onnection.php:61 ".
When I verify on my NAS the version of installed PhP I have this:
–php v (command line): 5.6

  • Phpinfo () (web page): 7.0
    My rescan does not thus work and I do not manage to find the solution. The Synology support tells me clearly that Nextcloud is not supported by them. I am thus surrounded.
    If somebody has an idea, I am interested.
    Thank you

Failed to connect to the database: the Year exception occured in driver: could not find driver

You can’t connect to your database. Did you use mysql or mariadb and is the daemon running?

you must access occ with the same php version which is running on your webinterface (php7 in this case)

I am assuming here that you get errors also if you call occ without parameters. Is that true?

So you have to change the default php running in your shell to 7.0.

try: sudo update-alternatives --config php

then you can select one. This setting is persistent after reboots, so dont worry.

I use MariaDB 5, installed on my NAS.

The daemon is running, otherwise I could note use my other DBs.

I don’t find this command on my NAS.

NAS systems are very stripped down OS-wise. If you cant install this program somehow, i´m stuck here myself.

try php -v and see what it gives you… should tell you 7 otherwise you don’t have or at least are not running 7 :wink:

Like I said on my post, php -v gives me “5.6”.

But a web page with phpinfo() gives me “7.0”.

It’s OK, the problem was solved.
Some extension makes errors, so I modified the .ini file to add extension “posix.so” for php v5.6.
And now, the command works fine.


1 Like