Operating system: Ubuntu 16.04
Web server: Nginx 1.11.9
Database: MariaDB 10.0.29
PHP version: 7.1
Nextcloud version: 11.01
Updated from an older Nextcloud/ownCloud or fresh install:fresh install
I tried to reproduce it on Nextcloud 11.0.1 with php 5.6 and 7.0 (dot-deb packages) on debian 8 with apache.
sudo -u www-data php occ maintenance:mode --ontruesudo -u www-data php occ maintenance:mode --offfalseOnly used the occ-command to enable and disable the maintenance mode, the value was always set correctly (without quotes around true or false).
Do you still have a different php version installed on your system as well? Perhaps it's a bug with php 7.1?
I think he used the occ config:system:set maintenance command, but in an incorrect way.
The complete command for that is:
occ config:system:set maintenance --value=false --type=bool
I agree on the incorrect way I was using the commands. It feels like a bug however that setting the mode without the type option works and unsetting without does not work.
Well "setting" only works, because php says that 'true' == true, but 'false' != false
The value in config.php was 'maintenance' => 'false',
(I don't know why as I have not edited this file manually.)
These commands didn't work
sudo -u www-data php occ maintenance:mode --on
sudo -u www-data php occ maintenance:mode --off
This command fixed the problem (Thank you @nickvergessen for the help)
occ config:system:set maintenance --value=false --type=bool
Version: Nextcloud 15.0.2
Most helpful comment
I think he used the
occ config:system:set maintenancecommand, but in an incorrect way.The complete command for that is:
occ config:system:set maintenance --value=false --type=bool