-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Session validation failed #9
Comments
I'm experiencing similar problems. Problem is that this is happening very sporadically. I put var_dump's in every validator and waited for it to happen again. I managed to track this down to the Id validator.
The regular expression obviously fails because of When the hash bits are set to 6, the validation succeeds. The question I have is, why does the session id contains that value while the hash bits are set to 5. Originally posted by @waltertamboer at zendframework/zend-session#69 (comment) |
I have the same issue... after I have applied SSL on the production server. And unfortunately I have no idea how to fix it.... Originally posted by @Mecanik at zendframework/zend-session#69 (comment) |
I'd love to fix this, but without a way to reproduce it, I have no way to proceed; any attempted fix would be guesswork at this point. If somebody who experiences the issue is able to isolate and create a reproduce case, please post it here or via a pull request with a failing test. Thanks! Originally posted by @weierophinney at zendframework/zend-session#69 (comment) |
Hi, was able to reproduce this issue. My session has 2 validators assigned I consider this to be the expected behaviour, so IMO you have 2 choices:
Rolando Isidoro Originally posted by @rolandoisidoro at zendframework/zend-session#69 (comment) |
I have this exception only in google chrome (in firefox everything is fine):
I removed all session validators. I remove all cookies but site opens in google chrome only in one mode: desktop or mobile. It looks like it is related to one simple fact: Originally posted by @tempfirstuser at zendframework/zend-session#69 (comment) |
I have added reproduced case up here in my post. But it doesn't looks like a bug at least in my case because of google chrome. Originally posted by @tempfirstuser at zendframework/zend-session#69 (comment) |
Could you also post (if of any relevance) the chrome web console output ? Originally posted by @jcaillot at zendframework/zend-session#69 (comment) |
I believe it is correct behaviour. As you noted the user agent is different when you are switching between mobile and desktop view (developer tools). So session is created with one UserAgent and when you change the it and refresh the page session validation is failing due to different UserAgent. Exactly the same behaviour you'll get with RemoteAddr but this might be harder to reproduce. The behaviour is described in the documentation: In general I am not sure if it is correct behaviour to throw exceptions, I think I would prefer new session to be generated in case of failed validation, but this will be BC Break. @weierophinney / @Xerkus What do you think? Originally posted by @michalbundyra at zendframework/zend-session#69 (comment) |
@jcaillot here is: Request headers of desktop mode for google chrome:
After that, I switch to the mobile mode and get HTTP ERROR 500. With this error I can't see any cookies or headers. Next what I am doing I delete all cookies and cache data of the page. After that I refresh the page in that same mobile mode and here is request headers of mobile mode in google chrome:
In this example cookies is different because I delete them all previously, but you should pay attention at different "User-Agent" of desktop and mobile mode. In the firefox "User-Agent" is the same in both modes and cookies is the same too. Originally posted by @tempfirstuser at zendframework/zend-session#69 (comment) |
@webimpress but I have removed all validators:
And the behavior of google chrome is the same. But this is true only for remote server. At my local server I don't get any error in google chrome when switching between modes. Originally posted by @tempfirstuser at zendframework/zend-session#69 (comment) |
I have deployed my project at first time yesterday at my remote server. At my local server I have added APPLICATION_ENV variable to apache2 config. At remote server I did not add this var to the apache2. At local server my /data/cache folder is emty. But at remote server I see two new files inside /data/cache. After removing these cache-files site works fine in both modes: desktop and mobile at google chrome. But it works without session validators. @webimpress , thank you for your help at zf chat. Originally posted by @tempfirstuser at zendframework/zend-session#69 (comment) |
Modify Module.php flile with this code:
It works for me. Reference: http://tecnicoweb.es/session-validation-failed-en-laminas/ |
Set 'attach_default_validators' option false for SessionManager, to disable seession id validtor. Sample code:
|
If computer only one browser. then open the size is ok.
If have other browser, like open the site use chrome. it's ok, then open the site use firefox.
The session will trow exception.
It's an abominable question.
The zend-session have half year no updated. The ZendFramework is ok?
Originally posted by @leolicai at zendframework/zend-session#69
The text was updated successfully, but these errors were encountered: