Memcache \OC\Memcache\APCu not available after PHP update, but module is loaded

Hello everyone, I just found myself blocked out of my OC panel after some upgrades.
My OC10 is installed on a Raspberry PI 4 with Raspbian 10, working fine since the installation some months ago.
I installed PHP 8.0 for another software I needed to install on the same host, and after that when I open OC login page I get the message:

Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?

I checked and the APCu extension seems enabled from a phpinfo:

Additional .ini files parsed […] /etc/php/7.3/apache2/conf.d/20-apcu.ini […]

I checked the “mods-available” and “mods-enabled” folders and the php 7.3 are untouched since the OC installation:

pi@raspberrypi:~ $ ls -l /etc/apache2/mods-available/ | grep php
-rw-r–r-- 1 root root 855 Feb 13 2021 php7.3.conf
-rw-r–r-- 1 root root 102 Feb 13 2021 php7.3.load
-rw-r–r-- 1 root root 855 Oct 22 14:37 php8.0.conf
-rw-r–r-- 1 root root 101 Oct 22 14:37 php8.0.load

pi@raspberrypi:~ $ ls -l /etc/apache2/mods-enabled/ | grep php
lrwxrwxrwx 1 root root 29 Apr 2 2021 php7.3.conf → …/mods-available/php7.3.conf
lrwxrwxrwx 1 root root 29 Apr 2 2021 php7.3.load → …/mods-available/php7.3.load

Any idea or suggestion on how to fix this?
Thank you in advance

Steps to reproduce

  1. Install OC10 with PHP 7.3 and Apache
  2. Update PHP to PHP 8.0
  3. Check the OC login page

Expected behaviour

Login page opening properly

Actual behaviour

When I open OC login page I get the message:

Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?

Server configuration

Raspbian

Apache

MySQL

PHP 7.3 / PHP 8.0 just installed

ownCloud 10

The content of config/config.php:
<?php
$CONFIG = array (
‘passwordsalt’ => ,
‘secret’ =>’,
‘trusted_domains’ =>
array (
0 => ‘localhost’,
1 => ',
2 => ,
3 => ,
4 =>
),
‘datadirectory’ => ‘/media/wde/data/’,
‘overwrite.cli.url’ => ‘http://localhost’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘10.7.0.4’,
‘dbname’ => ‘owncloud’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ,
‘dbpassword’ => ,
‘logtimezone’ => ‘UTC’,
‘apps_paths’ =>
array (
0 =>
array (
‘path’ => ‘/var/www/owncloud/apps’,
‘url’ => ‘/apps’,
‘writable’ => false,
),
1 =>
array (
‘path’ => ‘/var/www/owncloud/apps-external’,
‘url’ => ‘/apps-external’,
‘writable’ => true,
),
),
‘installed’ => true,
‘instanceid’ => ‘occg2z94ljfn’,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘127.0.0.1’,
‘port’ => ‘6379’,
),
‘maintenance’ => false,
);

**Operating system:**

### Logs
#### Web server error log

192.168.x.x - - [29/Oct/2021:23:05:14 +0200] “GET / HTTP/1.1” 500 468 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0”
192.168.x.x - - [29/Oct/2021:23:05:19 +0200] “GET /index.php/settings/integrity/failed HTTP/1.1” 500 468 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0”


#### ownCloud log (data/owncloud.log)

Empty


#### Browser log

GET http://x.x.x.x/index.php/ [HTTP/1.1 500 Internal Server Error 118ms]

After some tinkering I was able to restore the access, I will leave the details in hope it could ever help anyone.
I found out that OC is not compatible with PHP8 as of now: OwnCloud 10.5.0.10 and PHP 8.*
I disabled php 8 and re-enabled PHP 7.3:

sudo a2dismod php8.0

sudo a2enmod php7.3

sudo service apache2 restart

// Set alternative name path.

sudo update-alternatives -- set php /usr/bin/php7 .3

sudo update-alternatives -- set phar /usr/bin/phar7 .3

sudo update-alternatives -- set phar.phar /usr/bin/phar .phar7.3

And after that the apcu module still was reported as not found, so I re-installed it:

sudo apt-get install php7.3-apcu -y

After this, I was able to login again to the OC login page.

3 Likes

@Fuuzz
Thanks for the feedback, it will help to another guys :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.