Internal Server Error after changing PHP configuration

Support intro

Nextcloud stopped running when I changed php configuration.

Under Archlinux, I used to run Nextcloud with PHP7.3/Apache, simply with
php7_module and AddHandler php7-script .php. However, after
the latest update, I have got PHP7.4 instead of 7.3, and Nextcloud not being compatible
with PHP7.4, I decided to use PHP7.2 that I run parallel using fpm

<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php72-fpm/php-fpm.sock|fcgi://localhost/"

But this leads to

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Nextcloud version (eg, 12.0.2): $OC_Version = array(17,0,1,1)
Operating system and version (eg, Ubuntu 17.04): Archlinux
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.1): 7.2.17

The issue you are facing:

Trying to log in leads to an internal server error. Clients also get internal server error
requesting status.php

Is this the first time you’ve seen this error? (Y/N):
Yes, but this is the first time I’ve run nextcloud with this configuration.

Steps to replicate it:

  1. Install and run nextcloud with
  2. stop the http server
  3. change the configuration of php to use fpm
  4. restart the http server

The output of your Nextcloud log in Admin > Logging:

I can't log in to Nextcloud, so I can't possibly get the output

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

$CONFIG = array (
  'datadirectory' => '/mnt/archive/nextcloud-data',
  'overwrite.cli.url' => 'http://stone.local/nextcloud',
  'dbtype' => 'mysql',
  'version' => '',
  'installed' => true,
  'maintenance' => false,
  'simpleSignUpLink.shown' => false,
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'theme' => '',
  'datadirectory' => '/mnt/archive/nextcloud-data',
  'overwrite.cli.url' => 'http://stone.local/nextcloud',
  'dbtype' => 'mysql',
  'version' => '',
  'installed' => true,
  'maintenance' => false,
  'simpleSignUpLink.shown' => false,
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbuser' => '.......',
  'dbpassword' => ........',
  'theme' => '',
  'loglevel' => 0,
   'defaultapp' => 'apporder',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'app_install_overwrite' => 
  array (
    0 => 'admin_notifications',
    1 => 'piwik',
    2 => 'tasks',
    3 => 'mindmaps',
    4 => 'spgverein',
    5 => 'documents',
    6 => 'spreed',
    7 => 'event_update_notification',
    8 => 'dropit',
    9 => 'ownpad',
    10 => 'polls',
    11 => 'dashboard',
    12 => 'theming_customcss',
    13 => 'apporder',
  'has_rebuilt_cache' => true,

The output of your Apache/nginx/system log in /var/log/____:
In ettor log
`[Sat Nov 30 21:41:09.562798 2019] [proxy_fcgi:error] [pid 2581] [client] AH01071: Got error ‘Primary script unknown\n’

access log has full of 500 error.

Regarding Nextcloud Logs, you can find them at /mnt/archive/nextcloud-data/nextcloud.log
Can you post relevant lines of the log?

Consider removing confidential information from the Config.php you have posted online. Your Database password is also visible here.

Thanks, hopefully it wasn’t too late…

OK, examining the log, I found out that apcu cache wasn’t activated for php 7.2. So I installed and activated apcu cache, but I still keep getting the error

\HintException","Message":"Memcache \\OC\\Memcache\\APCu not available for local cache","Code":0,"T

So I commented out the memcache line in the config file, now there is no longer internal error,
but it is impossible to log in. I get something like

81.143","user":"--","app":"no app in context","method":"POST","url":"\/index.php\/login","message":
"Login failed: tak (Remote IP:","userAgent":"Mozilla\/5.0 (Linux; Android 7.0; Wile
yfox Spark +) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.108 Mobile Safari\/537.36",
81.143","user":"--","app":"core","method":"POST","url":"\/index.php\/login","message":"Bruteforce a
ttempt from \"\" detected for action \"login\".","userAgent":"Mozilla\/5.0 (Linux; An
droid 7.0; Wileyfox Spark +) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.3904.108 Mobile S
81.143","user":"--","app":"PHP","method":"POST","url":"\/index.php\/login","message":"You are using
 a fallback implementation of the intl extension. Installing the native one is highly recommended i
nstead. at \/usr\/share\/webapps\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootu
p\/intl.php#18","userAgent":"Mozilla\/5.0 (Linux; Android 7.0; Wileyfox Spark +) AppleWebKit\/537.3
6 (KHTML, like Gecko) Chrome\/78.0.3904.108 Mobile Safari\/537.36","version":""}

Good that similar questions are asked on a daily base so there is always a chance to find a match using the search function of this forum. Make sure that you correctly configure the cache for the right PHP version and you should be able to use the server again.

Somehow I hadn’t paid attention to that one because it was missing the key word “Primary script unknown”, and the post with these keywords didn’t help me,

But yes, the thread you quoted would have saved me some time by letting me look at the memecache configuration.

However, I found a quick fix from the thread

I don’t know why I can’t make apcu work with php7.2, but hopefully it doesn’t matter.