Internal server error after installing apcu

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): 22.1.1.2`

Operating system and version (eg, Ubuntu 20.04): Debian 10

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

PHP version (eg, 7.4): php7.3

The issue you are facing:

I cant access my webinterface because of an internal server error after i installed php-apcu.

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

Steps to replicate it:

  1. Install PHP7.3-apcu
  2. Add ‘memcache.local’ => ‘\OC\Memcache\APCu’, to config.php
  3. Add apc.enable_cli=1 to /etc/php/7.3/fpm/php.ini

The output of your Nextcloud log in Admin > Logging:

Not available because i cant access the webinterface. This is the output of nextcloud/data/nextcloud.log

{"reqId":"FX0w368T9YF6akmXmlaa","level":3,"time":"2021-08-27T20:05:40+00:00","remoteAddr":"%IP%","user":"--","app":"base","method":"GET","url":"/status.php","message":"Failed to start session","userAgent":"Mozilla/5.0 (Windows) mirall/3.3.1stable-Win64 (build 20210812) (Nextcloud, windows-10.0.19043 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"22.1.1.2","exception":{"Exception":"Exception","Message":"Failed to start session","Code":0,"Trace":[{"file":"/home/administrator/nextcloud/lib/base.php","line":423,"function":"__construct","class":"OC\\Session\\Internal","type":"->","args":["ocrx3jhkwm3u"]},{"file":"/home/administrator/nextcloud/lib/base.php","line":645,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"/home/administrator/nextcloud/lib/base.php","line":1083,"function":"init","class":"OC","type":"::","args":[]},{"file":"/home/administrator/nextcloud/status.php","line":37,"args":["/home/administrator/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/home/administrator/nextcloud/lib/private/Session/Internal.php","Line":62,"CustomMessage":"--"}}

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

<?php
$CONFIG = array (
  'instanceid' => 'CENSORED',
  'passwordsalt' => 'CENSORED',
  'secret' => 'CENSORED',
  'trusted_domains' =>
  array (
    0 => 'MYDOMAIN',
  ),
  'datadirectory' => '/home/administrator/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.1.1.2',
  'overwrite.cli.url' => 'MYDOMAIN',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nc_user',
  'dbpassword' => 'MYPASS',
  'installed' => true,
  'app_install_overwrite' => true,
  'skeletondirectory' => '/home/administrator/nextcloud/default-files',
  array (
    0 => 'twofactor_email',
    1 => 'sharingpath',
    2 => 'drop_account',
    3 => 'groupfolders',
  ),
  'updater.secret' => 'CENSORED',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.distributed' => '\OC\Memcache\Redis',
  'redis' => [
       'host'     => '127.0.0.1',
       'port'     => '6379',
  ],
);

The output of your Apache/nginx/system log in /var/log/____:

MYIP - user [27/Aug/2021:20:30:26 +0000] "GET /status.php HTTP/2.0" 200 1336 "-" "Mozilla/5.0 (Windows) mirall/3.3.1stable-Win64 (build 20210812) (Nextcloud, windows-10.0.19043 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

the most mistake in this case is to forget to install php7.4-apcu (or depending on your system php-apcu).

just try: apt install php-apcu -y

and restart your webserver: systemctl restart apache2.service.

just to prevent the mistake even fatfinger from time to time.

*even I fatfinger from time to time.