Nextcloud version : 26.0.0.11
Operating system and version : openSUSE Leap 15.4 - Linux 5.14.21-150400.24.46-default
Apache version : Apache/2.4.51 (Linux/SUSE)
PHP version : PHP 8.0.28 (cli) (built: Feb 16 2023 12:00:00) ( NTS )
The issue you are facing:
foreach() argument must be of type array|object, null given at /srv/www/htdocs/nextcloud/apps/user_saml/lib/SAMLSettings.php#118
Is this the first time you’ve seen this error? : Yes, because of several problems I installed this RC, but not intended… see https://help.nextcloud.com/t/re-second-rc-of-nextcloud-26/158718/1
Steps to replicate it:
- On the server no logging occurred in spite of log settings.
- sudo -u wwwrun php /srv/www/htdocs/nextcloud/occ log:watch
- Open https://wolk.ledelay.net/index.php in browser.
The output of your Nextcloud log in Admin > Logging:
docc log:watch
Error PHP foreach() argument must be of type array|object, null given at 2023-04-08T12:22:20+00:00
/srv/www/htdocs/nextcloud/apps/user_saml/lib/SAMLSettings.php#118
Error PHP foreach() argument must be of type array|object, null given at 2023-04-08T12:22:27+00:00
/srv/www/htdocs/nextcloud/apps/user_saml/lib/SAMLSettings.php#118
Error PHP foreach() argument must be of type array|object, null given at 2023-04-08T12:22:27+00:00
/srv/www/htdocs/nextcloud/apps/user_saml/lib/SAMLSettings.php#118
Error index OneLogin\Saml2\Error: Invalid array settings: idp_entityId_not_found, 2023-04-08T12:22:27+00:00
idp_sso_not_found, idp_cert_or_fingerprint_not_found_and_required at
.../vendor/onelogin/php-saml/src/Saml2/Settings.php line 141
0. .../src/Saml2/Auth.php line 178
OneLogin\Saml2\Settings->__construct(
)
1. .../SAMLController.php line 206
OneLogin\Saml2\Auth->__construct(
)
2. .../Dispatcher.php line 230
OCA\User_SAML\Controller\SAMLController->login("*** sensitive para ... *")
3. .../Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController(
)
4. .../App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch(
)
5. lib/private/Route/Router.php line 315
OC\AppFramework\App::main(
)
6. lib/base.php line 1055
OC\Route\Router->match(
)
7. index.php line 36
OC::handleRequest(
)
Error PHP foreach() argument must be of type array|object, null given at 2023-04-08T12:22:27+00:00
/srv/www/htdocs/nextcloud/apps/user_saml/lib/SAMLSettings.php#118
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'SECRET',
'passwordsalt' => 'SECRET',
'secret' => 'SECRET',
'trusted_domains' =>
array (
0 => 'wolk.ledelay.net',
),
'datadirectory' => '/wolk/',
'dbtype' => 'mysql',
'version' => '26.0.0.11',
'dbname' => 'nc',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'SECRET',
'mysql.utf8mb4' => true,
'dbuser' => 'SECRET',
'dbpassword' => 'SECRET',
'installed' => true,
'theme' => '',
'loglevel' => 1,
'log_type' => 'file',
'logfile' => '/var/log/apache2/nextcloud/wolk.log',
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'maintenance' => false,
'default_phone_region' => 'nl',
'data-fingerprint' => 'SECRET',
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_sendmailmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_from_address' => 'SECRET',
'mail_domain' => 'SECRET',
'mail_smtphost' => 'SECRET',
'mail_smtpport' => 'SECRET',
'mail_smtpname' => 'SECRET',
'mail_smtppassword' => 'SECRET',
'memcache.local' => '\\OC\\Memcache\\APCu',
'overwritehost' => 'wolk.ledelay.net',
'overwriteprotocol' => 'https',
'overwritewebroot' => '/',
'overwrite.cli.url' => 'https://wolk.ledelay.net',
'app_install_overwrite' =>
array (
0 => 'files_reader',
),
'updater.release.channel' => 'stable',
);
The output of your Apache/system log in /var/log/error.log
: (not sure if related, crashes are seen from apache2)
error.log:
[Sat Apr 08 14:24:01.584964 2023] [mpm_prefork:notice] [pid 28120] AH00169: caught SIGTERM, shutting down
[Sat Apr 08 14:28:01.884210 2023] [so:warn] [pid 28483] AH01574: module ssl_module is already loaded, skipping
PHP Warning: Module "apcu" is already loaded in Unknown on line 0
PHP Warning: Module "gd" is already loaded in Unknown on line 0
PHP Warning: Module "imagick" is already loaded in Unknown on line 0
PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
[Sat Apr 08 14:28:01.945223 2023] [mpm_prefork:notice] [pid 28489] AH00163: Apache/2.4.51 (Linux/SUSE) OpenSSL/1.1.1l PHP/8.0.28 configured -- resuming normal operations
[Sat Apr 08 14:28:01.945273 2023] [core:notice] [pid 28489] AH00094: Command line: '/usr/sbin/httpd-prefork -D SYSCONFIG -D SSL -D ssl -C PidFile /run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -f /etc/apache2/httpd.conf -c Include /etc/apache2/sysconfig.d//include.conf'
access.log
87.195.144.218 - - [08/Apr/2023:14:24:01 +0200] "GET /index.php HTTP/1.1" 302 - "-" "Wget/1.20.3 (linux-gnu)"
87.195.144.218 - - [08/Apr/2023:14:24:01 +0200] "GET /index.php/login HTTP/1.1" 302 - "-" "Wget/1.20.3 (linux-gnu)"
87.195.144.218 - - [08/Apr/2023:14:24:01 +0200] "GET /index.php/apps/user_saml/saml/login?originalUrl=&idp=1&requesttoken=yGc6GfZEM/D%2B0Ds4ccLChp6Plcq5iTyS9uG04yDKRw0%3D:sChYSqcqZ5SPp1FOBaCh38/E5/OO%2BUXcrMrfglW5CSI%3D HTTP/1.1" 500 3982 "-" "Wget/1.20.3 (linux-gnu)"
Output errors in wolk.log in /var/log/apache2/nextcloud/
-2 File does not exist
So the set logfile does not exist.
Somewhere I found similar errors (will attach link when I find it again) about PHP version mixup error? It was here: FS#78028 : [nextcloud] 26.0.0 mixed php and php-legacy deps