CRON not running after HEIC Preview PHP8.2 installation

Nextcloud version (eg, 20.0.5): 25.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 11 bullseye
Apache or nginx version (eg, Apache 2.4.25): NGINX 1.23.1
PHP version (eg, 7.4): 8.1 / 8.2

The issue you are facing: I tried to setup the HEIC Preview and Support. Found a instruction somewhere at this forum.

Solution was to install PHP8.2 and modify config.php

Since i installed PHP8.2 cron is not running anymore

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

The output of your Nextcloud log in Admin > Logging:

nothing regarding cron

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!): HEIC removed as it was not working

<?php
$CONFIG = array (
  'instanceid' => 'ocxxx12',
  'passwordsalt' => 'mxxx2t',
  'secret' => '3Ixxx/k',
  'trusted_domains' =>
  array (
    0 => 'dx.com',
  ),
  'trusted_proxies' =>
  array (
    0 => '19x4',
  ),
  'datadirectory' => '/mnt/nc_data',
  'dbtype' => 'mysql',
  'version' => '25.0.2.3',
  'overwrite.cli.url' => 'https://xm',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nexer',
  'dbpassword' => 'oxr',
  'installed' => true,
  'overwritehost' => 'dx.com',
  'activity_expire_days' => 14,
  'allow_local_remote_servers' => true,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'default_phone_region' => 'DE',
  'defaultapp' => 'files,dashboard',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'htaccess.RewriteBase' => '/',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 2,
  'logtimezone' => 'Europe/Berlin',
  'log_rotate_size' => '104857600',
  'maintenance' => false,
  'maintenance_window_start' => 1,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'profile.enabled' => false,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 1,
  ),
  'quota_include_external_storage' => false,
  'share_folder' => '/Freigaben',
  'skeletondirectory' => '',
  'theme' => '',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'mail_from_address' => 'mx0',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'x.de',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'mail.net',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'mx',
  'mail_smtppassword' => 'Sx',
);

What i found that still PHP8.1 seems to be used:

php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php8.1-fpm.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-01-12 16:22:44 CET; 1 day 2h ago
       Docs: man:php-fpm8.1(8)
    Process: 804 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/8.1/fpm/pool.d/www.conf 81 (code=exited, status=0/SUCCESS)
   Main PID: 183 (php-fpm8.1)
     Status: "Processes active: 0, idle: 324, Requests: 5916, slow: 0, Traffic: 0req/sec"
      Tasks: 336 (limit: 38294)
     Memory: 3.6G
        CPU: 11min 55.566s
     CGroup: /system.slice/php8.1-fpm.service
             |- 183 php-fpm: master process (/etc/php/8.1/fpm/php-fpm.conf)
             |- 405 php-fpm: pool www

while PHP8.2 is doing what ?

sudo systemctl status php8.2-fpm.service nginx.service
Unit php8.2-fpm.service could not be found.
* nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-01-12 16:22:42 CET; 1 day 2h ago
       Docs: https://nginx.org/en/docs/
    Process: 182 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
   Main PID: 201 (nginx)
      Tasks: 5 (limit: 38294)
     Memory: 19.4M
        CPU: 11.475s
     CGroup: /system.slice/nginx.service
             |-201 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
             |-202 nginx: worker process
             |-203 nginx: worker process
             |-204 nginx: worker process
             `-205 nginx: worker process

Jan 12 16:22:42 nextcloud systemd[1]: Starting nginx - high performance web server...
Jan 12 16:22:42 nextcloud systemd[1]: Started nginx - high performance web server.

Not sure how to proceed without making NC not working anymore.

I appreciate any kind of help.

PHP 8.2 is not supported in Nextcloud.

OK. Thanks for info but this doesn’t help to solve my issue.

This should give you a hint:

And here you can make yourself familiar on how to install and manage multiple PHP versions on Debian.

But as @just already said. PHP 8.2 is not yet supported and there are still unsolved issues. So unless your goal is to help with testing and reporting bugs on GitHub, I would strongly advise against using PHP 8.2, at this point.

Hi,

thanks for your reply. I understood that 8.2 is not supported and i only like to get rid of version 8.2 from the system in a safe way. Don’t want to manage mulitiple versions.

Regards