Picture of Michel 6326
Registered 2 years 300 days
Michel 6326 Wednesday, 15 June 2022, 01:00 PM
Using PHP $_SESSION in MyApps
Hi all,

My app (ZO Boekhouden) is deployed on MyApps, but somehow users can't login. While testing I noticed that the php session storage can't be accessed (or that nothing is stored in the session).

Does anyone know how to fix this?

Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Wednesday, 15 June 2022, 02:03 PM
Re: Using PHP $_SESSION in MyApps
Hello Michel,

do you mean the session cookie is not stored?

Which browser is used? Or is it myApps client for windows?

Best Regards
Andreas Fink
Picture of Michel 6326
Registered 2 years 300 days
Michel 6326 Wednesday, 15 June 2022, 02:27 PM
Re: Using PHP $_SESSION in MyApps
I am using Microsoft Edge and Chrome, both with the same result.

I assume it is caused by the iFrame.
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Wednesday, 15 June 2022, 02:31 PM
Re: Using PHP $_SESSION in MyApps
Are any console logs or errors available?

Best Regards
Andreas Fink
Picture of Michel 6326
Registered 2 years 300 days
Michel 6326 Wednesday, 15 June 2022, 02:35 PM
Re: Using PHP $_SESSION in MyApps
None, I tested with an print_r($_SESSION) and it returns and empty array.

FYI: when logging in, the website checks the session to see if there is an user id. If not, it will load the login page. When someone login, it stores the user credentials in the session en reload the page (where it should load the portal for logged in users).
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Wednesday, 15 June 2022, 02:42 PM
Re: Using PHP $_SESSION in MyApps
> None, I tested with an print_r($_SESSION) and it returns and empty array.

Sure, but you have to post here some logs from the client side, not from the server. This is where you state the problem appears. There must be a possibility to check if the cookie is stored or not, and if not why. With the Chrome Developer Tools it should be possible.

Best Regards
Andreas Fink
Picture of Michel 6326
Registered 2 years 300 days
Michel 6326 Wednesday, 15 June 2022, 06:39 PM
1 of 1 users consider this post helpful
Re: Using PHP $_SESSION in MyApps
The problem was that the cookie parameter of the website was set to same site.
I now did samesite = none, and it is working.


← You can define your color theme preference here