Nextcloud PHP redis error - internal server error HTTP 500

Problem 

After the update nextcloud script the Nextcloud VM (Ubuntu 22.04, Nextcloud 32.0.9, PHP 8.2) is down, the webinterfaces shows a an HTTP 500 internal server error


When checking /var/log/apache2/error.log you see:

[Sun May 10 20:38:17.007818 2026] [proxy_fcgi:error] [pid 3221266:tid 140432444835008] [client 172.21.42.211:61182] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught OCP\\HintException: [0]: Memcache OC\\Memcache\\Redis not available for local cache (Is the matching PHP module installed and enabled?)\n\n thrown in /var/www/nextcloud/lib/private/Memcache/Factory.php on line 75'

When running php -r "var_dump(class_exists('Redis'));" you get a false:

root@nxtcldger031:~#
root@nxtcldger031:~# php -r "var_dump(class_exists('Redis'));"
bool(false) 
root@nxtcldger031:~#
root@nxtcldger031:~# php -m | grep redis
root@nxtcldger031:~#

 

Cause

Nextcloud tried to use Redis for local memcache but PHPs Redis extension (php-redis) isn't installed or enabled (anymore, in my case after the nextcloud update script).

The redis package installed from the Ondrej PPA was built against the ondrej-provided igbinary binary ABI/version. The PECL-installed igbinary (and its version/ABI) didn’t satisfy that dependency, producing undefined symbol errors when loading redis.so. 


Temp Solution/Workaround

Solution if your are running Nextcloud 32.0.9 on Ubuntu 22.04 with PHP8.2.31 and Apache2: 
  1. sudo apt install -y php8.2-dev build-essential pkg-config unzip
  2. sudo pecl install igbinary
  3. echo "extension=igbinary.so" | sudo tee /etc/php/8.2/mods-available/igbinary.ini
  4. sudo phpenmod -v 8.2 -s ALL igbinary
  5. sudo pecl uninstall redis || true
  6. sudo pecl install redis
  7. echo "extension=redis.so" | sudo tee /etc/php/8.2/mods-available/redis.ini
  8. sudo phpenmod -v 8.2 -s ALL redis
  9. sudo systemctl restart php8.2-fpm
  10. sudo systemctl restart apache2
  11. php -r "var_dump(function_exists('igbinary_serialize'));"
  12. php -r "var_dump(class_exists('Redis'));"
  13. cd /var/www/nextcloud
  14. sudo -u www-data php occ maintenance:mode --off
root@nxtcldger031:~#
root@nxtcldger031:~# php -r "var_dump(class_exists('Redis'));"
bool(true)
root@nxtcldger031:~# php -m | grep redis
redis
root@nxtcldger031:~#
 
 

Solution for picking redis package from the Ondrej PPA

  1. sudo pecl uninstall igbinary
  2. sudo rm -f /etc/php/8.2/cli/conf.d/20-redis.ini /etc/php/8.2/fpm/conf.d/20-redis.ini /etc/php/8.2/apache2/conf.d/20-redis.ini
  3. sudo find /usr/lib/php -name 'igbinary.so' -o -name 'redis.so' -exec ls -l {} \;
  4. sudo rm -f /usr/lib/php/20220829/igbinary.so /usr/lib/php/20220829/redis.so
  5. sudo find /usr/lib/php -name 'igbinary.so' -o -name 'redis.so' -exec ls -l {} \;
  6. sudo apt install php8.2-igbinary php8.2-redis --reinstall
  7. sudo phpenmod -v 8.2 -s ALL igbinary redis
  8. sudo systemctl restart php8.2-fpm
  9. sudo systemctl restart apache2
  10. php -r "var_dump(function_exists('igbinary_serialize'));"
  11. php -r "var_dump(class_exists('Redis'));"
root@nxtcldger031:~#
root@nxtcldger031:~# php -r "var_dump(class_exists('Redis'));"
bool(true)
root@nxtcldger031:~# php -m | grep redis
redis
root@nxtcldger031:~#
 

 

Monitor UniFi WLAN Access Point with PRTG with SNMPv3 Auth+Encrypted

This is a tiny guide howto monitor your UniFi wireless accesspoint, in this case a Unifi U7 pro with SNMPv3 with AES-Encryption and SHA-Authentication using PRTG:

  1. Configure SNMP Monitoring in UniFis settings --> CyberSecure --> Traffic Logging --> SNMP Monitoring --> SNMPv3 --> set a unique username and unique long passwordUniFi SNMPv3 PRTG monitoring
  2. UniFi will use SNMPv3 with Encryption Type AES-128 and Authentication Method SHA1. The selected password will be used for Authentication and Encryption.
  3. Create a device in PRTG and edit the device settings to:
    PRTG Unifi SNMP v3


  4. Add PRTG sensors like e.g. the SNMP traffic sensor to monitor the UniFi access points physical (e.g. eth0) and virtual ports VLAN ports (e.g. eth0.100 for VLAN ID 100):

     

 

Do not forget to set ACLs and network segmentation, so the SNMP and other management interfaces are only reachable from dedicated source ip-addresses. Also keep in mind, that in SNMPv3 AuthPriv the username is sent in plaintext over the network eventhough you chose with AuthPriv authentication and encryption, as shown in the following screenshot or mentioned in my article from 2018.

SNMPv3 username cleartext even though encrypted

 


 

 

Nextcloud PHP redis error - internal server error HTTP 500

Problem  After the update nextcloud script the Nextcloud VM (Ubuntu 22.04, Nextcloud 32.0.9, PHP 8.2) is down, the webinterfaces shows a an ...