Nextcloud version (eg, 20.0.5): 28.0.0.11
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 12 (bookworm) x86_64
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.57
PHP version (eg, 7.4): 8.2.14 (cli)
I’ve been getting the errorr:
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.
I was dealing with issues regarding php-gd, which could not be loaded, see:
laslo@v2202208181276198316:/var/log$ php -version
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.2.14 (cli) (built: Dec 21 2023 20:18:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.14, Copyright (c) Zend Technologies
with Zend OPcache v8.2.14, Copyright (c), by Zend Technologies
The php install is quite messy.
More details not key to the issue
Yes, php-gd is installed:
laslo@v2202208181276198316:/var/log$ sudo apt search php-gd
Sortierung… Fertig
Volltextsuche… Fertig
php-gd/bullseye,now 2:8.2+93+0~20231125.47+debian11~1.gbpc7171d all [installiert]
GD-Modul für PHP (Standard)
laslo@v2202208181276198316:/usr/lib/php/20220829$ ls gd.so
gd.so
I’ve tried accessing occ for logs, but:
laslo@v2202208181276198316:/var/log$ sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:repair
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
Yes, php-apcu
is installed:
php-apcu/bullseye,now 5.1.23-1+0~20231125.39+debian11~1.gbp8bf49a amd64 [installiert]
APC User Cache for PHP
I’ve added a ‘help.php’ to the nextcloud install directory, which prints phpinfo(), and set error_log in the ini file which itself contains:
laslo@v2202208181276198316:/var/log$ sudo cat php_errors.log
[23-Dec-2023 13:36:23 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[23-Dec-2023 13:39:02 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[23-Dec-2023 14:09:01 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
—Disclaimer not relevant to the question itself—
Now, I know my install is quite messy as when I set this up, I was not experienced at all with servers (I had some linux experience) and I suspect I did some things quite badly when setting this up, so this is very likely a mistake on my part.
I also know that it was dumb on my part to not back up nextcloud right before playing around, I do have a backup but it’s like 2 weeks old, sorry about that…
—End disclaimer—
Is this the first time you’ve seen this error? (Y/N): Y
The output of your Nextcloud log in Admin > Logging:
Not accessible
The output of your config.php file in /var/www/nextcloud/config
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => 'nextcloud.laslo-hauschild.eu',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '28.0.0.11',
'overwrite.cli.url' => 'https://nextcloud.laslo-hauschild.eu',
'dbname' => 'clouddb',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xxx',
'dbpassword' => 'xxx',
'installed' => true,
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'xxx',
'mail_domain' => 'xxx',
'default_phone_region' => 'DE',
'memcache.local' => '\\OC\\Memcache\\APCu',
'remember_login_cookie_lifetime' => 1296000,
'session_lifetime' => 1800,
'session_keepalive' => false,
'auto_logout' => true,
'mail_smtphost' => 'xxx',
'mail_smtpport' => 'xxx',
'mail_smtpauth' => 1,
'mail_smtpname' => 'xxx',
'mail_smtppassword' => 'xxx',
'mail_smtpsecure' => 'ssl',
'app_install_overwrite' =>
array (
0 => 'apporder',
),
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
'updater.secret' => 'xxx',
);
The output of your Apache/nginx/system log in /var/log/____
:
[Sat Dec 23 00:00:01.066249 2023] [mpm_prefork:notice] [pid 5137] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 00:00:01.066305 2023] [core:notice] [pid 5137] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 05:23:23.188925 2023] [proxy_fcgi:error] [pid 111829] [client 209.141.46.150:64393] AH01071: Got error 'Primary script unknown', referer: http://www.google.com.hk
[Sat Dec 23 06:18:52.391123 2023] [proxy_fcgi:error] [pid 111831] [client 198.98.58.38:57720] AH01071: Got error 'Primary script unknown', referer: http://www.google.com.hk
[Sat Dec 23 06:45:21.964983 2023] [proxy_fcgi:error] [pid 111831] [client 91.92.240.122:59834] AH01071: Got error 'Primary script unknown'
[Sat Dec 23 09:29:16.627398 2023] [proxy_fcgi:error] [pid 111828] [client 134.122.37.174:34724] AH01071: Got error 'Primary script unknown'
[Sat Dec 23 11:48:47.653229 2023] [access_compat:error] [pid 111831] [client 78.35.61.244:54146] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Sat Dec 23 11:55:28.733104 2023] [proxy_fcgi:error] [pid 120769] [client 78.35.61.244:47392] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 218211416 bytes) in /var/www/nextcloud/updater/index.php on line 712'
[Sat Dec 23 11:55:40.043919 2023] [access_compat:error] [pid 120557] [client 78.35.61.244:46598] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Sat Dec 23 11:58:58.499726 2023] [mpm_prefork:notice] [pid 5137] AH00170: caught SIGWINCH, shutting down gracefully
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sat Dec 23 11:58:58.735520 2023] [mpm_prefork:notice] [pid 148275] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 11:58:58.735593 2023] [core:notice] [pid 148275] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 12:00:09.958599 2023] [access_compat:error] [pid 149198] [client 78.35.61.244:54272] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Sat Dec 23 12:09:08.642087 2023] [access_compat:error] [pid 148310] [client 78.35.61.244:35042] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Sat Dec 23 12:30:21.011402 2023] [mpm_prefork:notice] [pid 148275] AH00171: Graceful restart requested, doing restart
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sat Dec 23 12:30:21.207354 2023] [mpm_prefork:notice] [pid 148275] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 12:30:21.207387 2023] [core:notice] [pid 148275] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 12:46:03.462525 2023] [mpm_prefork:notice] [pid 148275] AH00170: caught SIGWINCH, shutting down gracefully
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sat Dec 23 12:46:22.816606 2023] [mpm_prefork:notice] [pid 756] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 12:46:22.816814 2023] [core:notice] [pid 756] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 12:55:35.681559 2023] [mpm_prefork:notice] [pid 756] AH00170: caught SIGWINCH, shutting down gracefully
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sat Dec 23 12:55:35.913661 2023] [mpm_prefork:notice] [pid 1066] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 12:55:35.913740 2023] [core:notice] [pid 1066] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 13:04:55.907570 2023] [mpm_prefork:notice] [pid 1066] AH00170: caught SIGWINCH, shutting down gracefully
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sat Dec 23 13:05:14.039404 2023] [mpm_prefork:notice] [pid 730] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 13:05:14.039516 2023] [core:notice] [pid 730] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 13:32:58.285838 2023] [mpm_prefork:notice] [pid 730] AH00170: caught SIGWINCH, shutting down gracefully
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (libx265.so.192: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sat Dec 23 13:32:58.540443 2023] [mpm_prefork:notice] [pid 1520] AH00163: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat Dec 23 13:32:58.540522 2023] [core:notice] [pid 1520] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 23 13:47:49.408663 2023] [proxy_fcgi:error] [pid 1525] [client 78.35.61.244:52412] AH01071: Got error 'Primary script unknown'
[Sat Dec 23 13:47:56.808866 2023] [access_compat:error] [pid 1524] [client 78.35.61.244:40708] AH01797: client denied by server configuration: /var/www/nextcloud/config/config.php
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
Last entry:
{"reqId":"3NMsG6AEBvkbrHjTSfpG","level":3,"time":"2023-12-17T20:32:08+00:00",