Admin Page Error - v2.0.4

569 views
Skip to first unread message

Skagnatti

unread,
Jul 18, 2023, 10:30:16 AM7/18/23
to SimpleSAMLphp

Hello,

I have simpleSAMLphp 2.0.4 installed in a PHP 8.0/Apache 2.4 environment.

 

This is an upgrade from a longtime 1.19 install.

 

I can load the https://domain-name/simplesaml/module.php/core/welcome splash page fine. The issue is then trying to load the admin page.

 

The ‘Functional changes’ here https://simplesamlphp.org/docs/stable/simplesamlphp-upgrade-notes-2.0.html mention “The base URL of the SimpleSAMLphp installation no longer provides an admin menu. Instead this is now at the location <simpleSAMLphp base URL>/admin . The admin module needs to be enabled for this to work”

I reviewed this section in the config.php file and saw the following, implying it is enabled by default, but probably a minor doc diff:


/***********

| MODULES |

***********/

  /*

   * Configuration for enabling/disabling modules. By default the 'core', 'admin' and 'saml' modules are enabled.

If I don’t uncomment the module to enable admin, thinking the admin module is enabled by default, I get the following errors/warnings on the simplesamlphp/module.php/admin/ page:

Warning: Class SimpleSAML\Session has no unserializer in /var/simplesamlphp/src/SimpleSAML/SessionHandlerPHP.php on line 249

Fatal error: Uncaught Error: Typed property SimpleSAML\Session::$trackid must not be accessed before initialization in /var/simplesamlphp/src/SimpleSAML/Session.php:552 Stack trace: #0 /var/simplesamlphp/src/SimpleSAML/Session.php(399): SimpleSAML\Session->getTrackID() #1 /var/simplesamlphp/src/SimpleSAML/Session.php(281): SimpleSAML\Session::load() #2 /var/simplesamlphp/src/SimpleSAML/Error/Error.php(191): SimpleSAML\Session::getSessionFromRequest() #3 /var/simplesamlphp/src/SimpleSAML/Error/Error.php(229): SimpleSAML\Error\Error->saveError() #4 /var/simplesamlphp/public/_include.php(26): SimpleSAML\Error\Error->show() #5 [internal function]: SimpleSAML_exception_handler() #6 {main} thrown in /var/simplesamlphp/src/SimpleSAML/Session.php on line 552

Warning: session_id(): Session ID cannot be changed when a session is active in /var/simplesamlphp/src/SimpleSAML/SessionHandlerPHP.php on line 188

Fatal error: Uncaught Error: Typed property SimpleSAML\Session::$trackid must not be accessed before initialization in /var/simplesamlphp/src/SimpleSAML/Session.php:552 Stack trace: #0 /var/simplesamlphp/src/SimpleSAML/Session.php(399): SimpleSAML\Session->getTrackID() #1 /var/simplesamlphp/src/SimpleSAML/Session.php(281): SimpleSAML\Session::load() #2 /var/simplesamlphp/src/SimpleSAML/Logger.php(323): SimpleSAML\Session::getSessionFromRequest() #3 [internal function]: SimpleSAML\Logger::shutdown() #4 {main} thrown in /var/simplesamlphp/src/SimpleSAML/Session.php on line 552


If I uncomment the admin module, as suggested in the upgrade notes, I still get a similar error(without the accompanying warning), but in the syslog:

'module.enable' => [

       'admin' => true,

],

Jul 18 10:17:03 hostname php-error [18-Jul-2023 10:17:03 America/Chicago] PHP Fatal error:  Uncaught Error: Typed property SimpleSAML\Session::$trackid must not be accessed before initialization in /var/simplesamlphp/src/SimpleSAML/Session.php:552

Seeing the dialog ‘session’ in the error, the ‘Session Configuration’  in config.php I have b/w v1.19 and v2.0.4 are the same – essentially default configs.

Any insight is appreciated.

Tim van Dijen

unread,
Jul 18, 2023, 10:51:08 AM7/18/23
to SimpleSAMLphp
Hi !

What session handler are you using? phpsession?

- Tim

Op dinsdag 18 juli 2023 om 16:30:16 UTC+2 schreef skag...@gmail.com:

Tim van Dijen

unread,
Jul 18, 2023, 10:51:35 AM7/18/23
to SimpleSAMLphp
Never mind, that was a stupid question... It says so in the error messages :')

Op dinsdag 18 juli 2023 om 16:51:08 UTC+2 schreef Tim van Dijen:

Miha Frangež

unread,
Jul 3, 2024, 11:41:58 AM7/3/24
to SimpleSAMLphp
I got the same error after a 1.18-2.2 upgrade and the cause ended up being an old session cookie that was still in my browser from the previous version. Deleting the cookie solved it.
(sorry for necroposting, I figured this might help someone in the future since this is the only Google result for this specific error)

torek, 18. julij 2023 ob 16:51:35 UTC+2 je oseba Tim van Dijen napisala:

Tim van Dijen

unread,
Jul 4, 2024, 4:11:56 AM7/4/24
to SimpleSAMLphp
No problem Miha, thank you!

What also should have worked is to remove your old session files from the server..
The issue here is that the historical session cannot be restored, because things have changed in between versions..

The following is mentioned in the upgrade notes for 2.0:
"Sessions are no longer backwards compatible with previous versions. Make sure to clear your session cache during the upgrade process. How to do this depends on your session backend."

- Tim

Op woensdag 3 juli 2024 om 17:41:58 UTC+2 schreef miha.f...@gmail.com:
Reply all
Reply to author
Forward
0 new messages