Internal Server Error NC28

[/subject]
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.

[/details]

Nextcloud version 28.0.1
Operating system and version Debian Bookworm (12.4)
Apache or nginx version Nginx 1.22.1
PHP version 8.2

The issue you are facing:

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

Steps to replicate it:

  1. Upgrade PHP

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

PASTE HERE
<?php
$CONFIG = array (
  'instanceid' => 
  'passwordsalt' => 
  'secret' => 
  'trusted_domains' => 
  array (
    0 => 
    1 => 
  ),
  'datadirectory' => '/home/nextcloud',
  'dbtype' => 'mysql',
  'version' => '28.0.1.1',
  'overwrite.cli.url' => 'http://ardbeg/nextcloud',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'password',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 
  'mail_smtphost' => 
  'mail_smtpport' => '587',
  'app_install_overwrite' => 
  array (
    0 => 'dicomviewer',
    1 => 'dashboardcharts',
    2 => 'admin_notifications',
    3 => 'breezedark',
    4 => 'richdocumentscode',
    5 => 'apporder',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'DE',
  'enforce_theme' => 'breezedark',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 
  'mail_smtppassword' => 
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'updater.secret' => 
);

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

PASTE HERE

cat /var/log/nginx/error.log

2023/12/22 20:27:51 [error] 653649#653649: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

  thrown in /var/www/html/nextcloud/lib/private/Memcache/Factory.php on line 92" while reading response header from upstream, client: 192.168.42.187, server: whiskykult.ddnss.de, request: "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host:

How did you do the php-upgrade?

What is the output of

dpkg -l | awk '/^ii.*php/ {print $2}'

and

update-alternatives --get-selections | grep -E "ph(ar|p)"

and please, don’t post log-echo-salad but put it in a fenced codeblock.
You get a fenced codeblock with “Ctrl + e” and you can control if it looks good at the right side before you send it.
Simply edit your post please and REMOVE THE SECRET AND SALT!!.

Much luck,
ernolf


libphp-simplepie
php
php-apcu
php-bcmath
php-bz2
php-cgi
php-cli
php-common
php-curl
php-fpm
php-gd
php-geshi
php-gmp
php-imagick
php-intl
php-mbstring
php-mysql
php-nrk-predis
php-pclzip
php-phpseclib
php-predis
php-random-compat
php-sqlite3
php-xml
php-zip
php8.2
php8.2-bcmath
php8.2-bz2
php8.2-cgi
php8.2-cli
php8.2-common
php8.2-curl
php8.2-fpm
php8.2-gd
php8.2-gmp
php8.2-igbinary
php8.2-intl
php8.2-mbstring
php8.2-mysql
php8.2-opcache
php8.2-phpdbg
php8.2-readline
php8.2-redis
php8.2-sqlite3
php8.2-xml
php8.2-zip
php8.3-apcu
php8.3-cli
php8.3-common
php8.3-imagick
php8.3-opcache
php8.3-phpdbg
php8.3-readline
phar                           auto     /usr/bin/phar.default
phar.phar                      auto     /usr/bin/phar.phar.default
php                            auto     /usr/bin/php.default
php-cgi                        auto     /usr/bin/php-cgi.default
php-cgi-bin                    auto     /usr/lib/cgi-bin/php.default
phpdbg                         auto     /usr/bin/phpdbg8.3
php-fpm.sock                   auto     /run/php/php8.2-fpm.sock

I did it like it’s written here: PHP

# apt install -y apt-transport-https lsb-release ca-certificates wget 
# wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
# echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list 

and then apt update.

Than I used the script php-updater.

Now do the following:

sudo apt-get purge php8.3* php8.2-cgi php8.2-sqlite3
sudo apt-get install php8.2-apcu
sudo systemctl restart php8.2-fpm nginx

That should do it.


Then you should get rid of these meta packages:

php
php-apcu
php-bcmath
php-bz2
php-cgi
php-cli
php-curl
php-fpm
php-gd
php-geshi
php-gmp
php-imagick
php-intl
php-mbstring
php-mysql
php-nrk-predis
php-pclzip
php-phpseclib
php-predis
php-random-compat
php-sqlite3
php-xml
php-zip

If you have the time and leisure, test one by one whether you can remove them without having to remove packages that are important to you because of dependencies.

Much luck,
ernolf

1 Like

Oh yes, thank you. It’s almost working now.
There are more issues, but I will start an other thread for it.

1 Like

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