Failed Update: No php7.2-redis for Pi?

I’ve had no end of problems updating an older NextCloudPi instance that is in a remote location (friend’s office). Automatic updates were not being performed, and they started getting warnings/errors related to the PHP version.

After updating some things manually (the instance was so badly out of date that scripts were not helping), I’ve gotten to the point where the only thing missing to get the PHP piece solved is php7.2-redis… which doesn’t appear to be in the repos.

E: Unable to locate package php7.2-redis
E: Couldn't find any package by glob 'php7.2-redis'
E: Couldn't find any package by regex 'php7.2-redis'

I’m trying to tackle some other issues too, so my info output is a mess, but here it is for some additional information:

NextCloudPi version  v0.46.6
NextCloudPi image    NextCloudPi_12-04-17
distribution         Raspbian GNU/Linux 10 \n \l
automount            no
USB devices          sda 
datadir              /media/InvisibleDrive/ncdata
data in SD           no
data filesystem      ext2/ext3
data disk usage      37G/1.8T
rootfs usage         3.3G/7.3G
swapfile             /var/swap
dbdir                 (doesn't exist)
Nextcloud check      error
HTTPD service        down
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            wlan0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               1:17

Anyway, things are a bit of a mess, and I’m supposed to be working on my thesis, but my friend has prevailed upon me to help, so I’m throwing myself on the mercy of the internet to try to get help and a second opinion.

All the required stuff follows

config.php

<?php
$CONFIG = array (
  'passwordsalt' => 'My4Y/NUH0klW756NDKG5ZpFPh9hwxX',
  'secret' => '9C3aFAEYWjVjN2sBHIW1jVswhiuUgf+rooYOqi9MJ/MybETf',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    1 => '192.168.0.6',
    3 => 'XXXXXXXXXXX.net',
  ),
  'datadirectory' => '/media/InvisibleDrive/ncdata',
  'overwrite.cli.url' => 'https://XXXXXXXXXXX.net',
  'dbtype' => 'mysql',
  'version' => '12.0.4.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'eSj*jVq413UW3TUSotD7xlc7FVD*kIW@hXX',
  'installed' => true,
  'instanceid' => 'ocs86rkb5syt',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'As4IIwcXY4cUtrMDTJ5vgB5S6UVtxVTcuBYbmeOTj8E=',
  ),
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'loglevel' => '2',
  'log_type' => 'file',
);

I don’t have an appropriate server log, but can share the output I get when I check status

sudo systemctl status apache2

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-12-03 12:47:20 UTC; 1h 33min ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 386 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Dec 03 12:47:12 nextcloudpi systemd[1]: Starting The Apache HTTP Server...
Dec 03 12:47:20 nextcloudpi apachectl[386]: (2)No such file or directory: AH02291: Cannot access directory '/var/www/nextcloud/data/' for error log of vhost defined at /etc/apache2/sites-enabled/nextcloud.conf:2
Dec 03 12:47:20 nextcloudpi apachectl[386]: AH00014: Configuration check failed
Dec 03 12:47:20 nextcloudpi apachectl[386]: Action 'start' failed.
Dec 03 12:47:20 nextcloudpi apachectl[386]: The Apache error log may have more information.
Dec 03 12:47:20 nextcloudpi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 03 12:47:20 nextcloudpi systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 03 12:47:20 nextcloudpi systemd[1]: Failed to start The Apache HTTP Server.

Try upgrading the version of php from php-7.2 to PHP-7.3 in your apache2
Was facing similar issue because when I updated stuffs manually, I inadvertently updated my php from 7.2 to 7 3 and hence all my installed modules were migrated from 7.2 to 7.3. So my OS was ready for 7.3 but my apache2 was still configured to use 7.2. Hence my redis caching was not working and I got an “Internal Server Error”

Refer my post here for the command to execute to change apache2 to use 7.3 and disable 7.2