If you have access to your database via cli or phpMyAdmin:
ALTER TABLE __nextcloud__.oc_share ADD INDEX share_with_index (share_with) USING BTREE; ALTER TABLE __nextcloud__.oc_share ADD INDEX parent_index (parent) USING BTREE;
Replace __nextcloud__ with your database schema name.
I don’t have an index of fs_mtime in table fillecache.
I’ve just updated my Synology NC 13.0.7 to 14.0.3.
I got the same security warning to update my DB index and run that command. This is what I did to run it.
Login to your Synology CLI
go to the directory of you nextcloud web folder
run this command there: sudo -u http php70 occ db:add-missing-indices
Note1: If you don’t run the command in the correct folder it will give an error: “Could not open input file: occ”
Note2: This depends on you Synoligy setup, but DSM uses php 5.6.11 as default from terminal when using php cmd. NC14 require php7.0 (hens the php70 command).
Note3: If you have a task running for the cron job, you might want to change that to php70 as well.
I’m also having trouble executing the command you posted.
The error message from shell:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php70/modules/libsodium.so' - /usr/local/lib/php70/modules/libsodium.so: cannot open shared object file: No such file or directory in Unknown on line 0
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /volume1/web/nextcloud/lib/private/DB/Connection.php:64
System is DSM 6.2.1-23824, Nextcloud is configured to run with PHP7.0 since v13.x. Do you have an idea?
Well, I’m no expert on the matter, but this sounds like a PHP 7.0 configuration issue. And I have to be honest, the PHP configuration of the synology is hard to understand. But I’ll try to point you in some directions.
On Synology running PHP from CLI uses different php.ini files than PHP ran from web page
WebStation PHP settings can be set in the WebStation DSM web GUI, and PHP settings for CLI needs to be addressed from CLI.
It’s important that both php configurations point the extention_dir to the correct directory:
Mine is set to:
/volume3/@appstore/PHP7.0/usr/local/lib/php70/modules
But yours could be on a different volume depending on your volume for @appstore.
To see your PHP configrations
running: php70 -ini from CLI will tell you where and what ini files are loaded when running php70 from CLI.
The same information for webstation can be obtained by loading a xxx.php file in the browser containing phpinfo() command
‘<?php
phpinfo();
?>’
Of cause the settings from the configuration files is also available in DSM Web GUI for the WebStation.
I do see some other solutions to solve the php.ini issues. like using the -c command to direct php to a different path for php.ini file. It’s also possible, but I’ve not tried it.
It’s also important that mysqli and pdo_mysql are enabled for the PHP7 configurations. Though I would assume this is ok in your setup.
Hope it helps you a little bit on the way to find solutions.
Thanks for your help. I changed the path in php.ini of CLI, but then I got error messages that the module builds don’t match to the PHP build. But with the other way, parameter -c, I were successful. The profiles of DSM-PHP are located here:
/var/packages/WebStation/etc/php_profile
The only problem is to find out the correct profile you use for your Nextcloud setup, I would suggest to inspect the file /conf.d/user_settings.ini, here you can try to identify your needed PHP-profile via activated extensions. Then I had to execute the following command: