CRON PHP Fatal error: Uncaught Error: Typed static property OC::$server must not

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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:

Nextcloud version (eg, 20.0.5): Nextcloud Hub 7 (28.0.4)
Operating system and version (eg, Ubuntu 20.04):
uname -v
#1 SMP Debian 5.10.162-1 (2023-01-21)

Apache or nginx version (eg, Apache 2.4.25):
nginx version: nginx/1.18.0

PHP version (eg, 7.4):

PHP 8.1.14 (cgi-fcgi) (built: Jan 29 2023 20:52:56)
Copyright (c) The PHP Group
Zend Engine v4.1.14, Copyright (c) Zend Technologies

The issue you are facing:
Cron.php does not work:
/var/www/restricted/ssh/drivekeep/cgi-bin/php -f /var/www/restricted/ssh/drivekeep/www/cron.php
PHP Fatal error: Uncaught Error: Typed static property OC::$server must not be accessed before initialization in /var/www/restricted/ssh/drivekeep/www/cron.php:188
Stack trace:
#0 {main}
thrown in /var/www/restricted/ssh/drivekeep/www/cron.php on line 188

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


<?php
$CONFIG = array (
  'instanceid' => 'xx',
  'passwordsalt' => 'xx',
  'secret' => 'xx',
  'trusted_domains' =>
  array (
    0 => 'xxxx',
  ),
  'datadirectory' => '/var/www/restricted/ssh/drivekeep/www/data',
  'dbtype' => 'mysql',
  'version' => '28.0.4.1',
  'overwrite.cli.url' => 'https://xxx',
  'dbname' => 'xx',
  'dbhost' => 'xx',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xx',
  'dbpassword' => 'xx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'FR',
  'app_install_overwrite' =>
  array (
    0 => 'extract',
  ),
);