I'm maintaining an old PHP server that offers SPID (electronic identity) services that were integrated years and years ago.
The site uses SimpleSAMLphp as an SP (service provider), the version of the library it is using is 1.10, from 2012. It has some issues and some security concerns, it should be updated, but for reasons I won't go into, it can't be updated, at this moment.
Recently I had to integrate a new SP on a separate part of the site, so I had the chance to try around with a newer version of SimpleSAMLphp safely. I took simpleSAMLphp v.1.18.8 (the newest I figured could run on my old setup) I managed to make it work, but I have a compatibility issue with the two libraries, old an new, that I can't figure out.
Both libraries use the PHP session to store their session, the issue only happens when old simpleSAMLphp tries to access the session set by the newer version. When old simpleSAMLPHP tries to access the session it returns this error:
Fatal error: SimpleSAML_Auth_Simple::requireAuth(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition SimpleSAML\Session of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition
If I manually delete the PHPSESSION cookie from my browser or the session get destroyed, the issue doesn't happen anymore until I let new SimpleSAMLphp set the session again (by trying to log-in).
The only (dumb) fix I could provide is completely clear the session when the user logs out; of course the session remains "broken" if the user doesn't manage to log-in, but just runs new SimpleSAML without passing through my log-out button after.
I've looked everywhere, but no one seems to know about this, please let me know if someone had similar issues. Any help or hint is very very appreciated. Also please let me know if and how I could improve this question, or if it just wasn't clear, I'm kind of new on stackoverflow, thank you.
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.