Php update error

My server says this after a php8.0 upgrade when updateing to NC26.

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

[/details]

Nextcloud version (eg, 20.0.5): 25 or 26 (Broke in upgrade)
Operating system and version (eg, Ubuntu 20.04): Ubuntu22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.0

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):Y

The output of your Nextcloud log in Admin > Logging:

CAN NOT ACCESS

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '161.97.82.210',
    2 => '',
    3 => '',
  ),
  'config_is_read_only' => false,
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => '',
  'version' => '26.0.0.11',
  'overwrite.cli.url' => '',
  'dbname' => '',
  'dbhost' => 'localhost',
  'dbport' => '5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'upgrade.disable-web' => 'true',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => '2',
  'allow_local_remote_servers' => true,
  'log.condition' => 
  array (
    'apps' => 
    array (
      0 => 'admin_audit',
    ),
  ),
  'mail_smtpmode' => 'smtp',
  'remember_login_cookie_lifetime' => '1800',
  'log_rotate_size' => '10485760',
  'trashbin_retention_obligation' => 'auto, 180',
  'versions_retention_obligation' => 'auto, 365',
  'simpleSignUpLink.shown' => false,
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => '',
  ),
  'logtimezone' => 'Europe/Berlin',
  'htaccess.RewriteBase' => '/',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\MarkDown',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\TXT',
    7 => 'OC\\Preview\\Movie',
    8 => 'OC\\Preview\\Photoshop',
    9 => 'OC\\Preview\\SVG',
    10 => 'OC\\Preview\\TIFF',
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'mail_smtpsecure' => 'tls',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'default_phone_region' => 'us',
  'updater.release.channel' => 'beta',
  'app_install_overwrite' => 
  array (
    0 => 'documentserver_community',
    1 => 'richdocuments',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

[Sat Mar 25 22:58:52.986049 2023] [mpm_prefork:notice] [pid 19350] AH00169: caught SIGTERM, shutting down
[Sat Mar 25 23:02:05.481659 2023] [http2:warn] [pid 814] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sat Mar 25 23:02:46.850269 2023] [mpm_prefork:notice] [pid 814] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Sat Mar 25 23:02:46.850446 2023] [core:notice] [pid 814] AH00094: Command line: '/usr/sbin/apache2'

Update.log says this

TERM environment variable needs set.
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud/lib/private/DB/Connection.php:142
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1531): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1029): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(264): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(417): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(183): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(373): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(976): OC\AppConfig->getValues()
#9 /var/www/nextcloud/lib/private/Server.php(729): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#13 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(193): OC\AppFramework\Utility\SimpleContainer->get()
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#19 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#21 /var/www/nextcloud/lib/private/Server.php(1108): OC\AppFramework\Utility\SimpleContainer->get()
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#25 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#27 /var/www/nextcloud/lib/private/Server.php(2063): OC\AppFramework\Utility\SimpleContainer->get()
#28 /var/www/nextcloud/lib/private/Files/View.php(119): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(464): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#33 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#35 /var/www/nextcloud/lib/private/Server.php(1465): OC\AppFramework\Utility\SimpleContainer->get()
#36 /var/www/nextcloud/lib/base.php(623): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1164): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once('...')
#39 /var/www/nextcloud/occ(11): require_once('...')
#40 {main}Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you!
sudo -u www-data php /var/www/nextcloud/occ -V failed

That’s your problem. Judging from the port in the config you’re using a Postgres database. You need to install the corresponding module for PHP8.0, something like php8.0-pgsql.
Depending on the system (and if you don’t know what is needed) it makes sense to take a look at what modules where installed before and then install the same modules for php8.0.

This way you can be sure to install exactly the same packages as before (change “old” and “new” accordingly):

old=7.4
new=8.0
apt-get install $(echo `dpkg -l | awk '/^ii/ {print $2}' | grep -i php$old | sed 's/php'$old'/php'$new'/g'`)
1 Like

what modules are needed for 8.0?

The required modules are in the documentation:
https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

Apps might require additional modules…

it’s already installed

Still the database driver missing? Did you install and enable it? And then restart webserver?

How do I enable it?

I don’t know out of the top of my head for all systems, so I would use my favorite search engine…

I tried enabling all the mods I had on php8.0 and got this

WARNING: Module zlib ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module zlib ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module zlib ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module zlib ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module zlib ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module zlib ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module standard ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module standard ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module standard ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module standard ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module standard ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module standard ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SPL ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module SPL ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module SPL ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SPL ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SPL ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SPL ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module sodium ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module sodium ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module sodium ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module sodium ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module sodium ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module sodium ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module soap ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module soap ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module SimpleXML ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module SimpleXML ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module SimpleXML ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SimpleXML ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SimpleXML ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module SimpleXML ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module session ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module session ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module session ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module session ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module session ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module session ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Reflection ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module Reflection ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module Reflection ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Reflection ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Reflection ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Reflection ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Phar ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module Phar ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module Phar ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Phar ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Phar ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Phar ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module PDO ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module PDO ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module PDO ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module PDO ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module PDO ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module PDO ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcre ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module pcre ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module pcre ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcre ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcre ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcre ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcntl ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module pcntl ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module pcntl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcntl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcntl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module pcntl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module openssl ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module openssl ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module openssl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module openssl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module openssl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module openssl ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module libxml ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module libxml ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module libxml ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module libxml ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module libxml ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module libxml ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module hash ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module hash ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module hash ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module hash ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module hash ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module hash ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module filter ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module filter ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module filter ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module filter ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module filter ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module filter ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module FFI ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module FFI ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module FFI ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module FFI ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module FFI ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module FFI ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module date ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module date ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module date ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module date ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module date ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module date ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Core ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module Core ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module Core ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Core ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Core ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module Core ini file doesn't exist under /etc/php/8.0/mods-available
WARNING: Module bz2 ini file doesn't exist under /etc/php/8.2/mods-available
WARNING: Module bz2 ini file doesn't exist under /etc/php/8.2/mods-available

I installed it with the install script. If I run it again would it remove my files?

Does anyone know? I need to know before my paper is do and it’s coming up.

UPDATE!

I just say this when updateing to the beta:

PHP Warning:  PHP Startup: Unable to load dynamic library 'smbclient.so'
smbclient.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

I don’t know what it means but It looks important

OK now it’s gone and still not working. No clue how to fix this. Anybody got ideas?

I just tried updating to beta and got this

OCP\HintException: [0]: Downgrading is not supported and is likely to cause unpredictable issues (from 26.0.0.12 to 26.0.0.10) ()

What I do not understand, is that you are on beta channel and you do not even understand such clear messages and echoes like:

That are very basic prolems which a linux user with medium skills can solve without problems.

You are doing weird chaotic things like

who gave you the advice to do that?

Php modules should be installed according to the rule “as little as possible and as much as necessary”. The steps you took created chaos.

As far as I could understand, you are trying to get everything on php8.0.
So that means, you should totaly remove everything php8.1 and php8.2 related before you try more steps:

sudo apt-get remove --purge php8.1* php8.2*

Do you have your old php version (7.4) still installed?

No I upgraded to nextcloud hub 4 so php7.4 would not work (trust me I tried) however I FOUND A SOLUTION :smiley: !

using this script (nextcloud-tools/decrypt-all-files.php at master · syseleven/nextcloud-tools · GitHub) I was able to decrypt my files and I will now use a snap package to reinstall. I have absolutely no clue how to fix this but it’s a solution to get my files back. If anyone has a idea pleases tell me soon because I will be reinstalling.

Thank you everyone who tried to help.

Why shoul I not "Trust§ you?

I just asked to get information that could have helped you.

So That was your problem? You did not tell nothing about it.

So tht is your “solution”?

Much luck

Well I was trying to fix it in other ways, eventually gave up, and now I have something I can settle with. I’m sorry I did not tell anyone but I was trying to fix this for the last 48 hours with out sleep. I posted this on github, reddit, here and other places but this is the only thing that “works” at this point.