cakephp - Reading Session value in beforeFilter() cake php -
I am using an ep_rr script to deal with broken links on my site, and in error 404 () action I write a session like this:
$ this-> controller-> session-> Write ("visitor", $ visitorId);
All this works because I can successfully read the session when I reload the app_rar. Once I've written the value of this session, then I redirect to an administrator :
$ this-> controller-> Redirect ($ redirectURL, 301);
What I'm trying to do, this session value is to be checked in the app_controller in the Filter () callback beforehand, but it is not able to detect this value. Ive tried
$ this-> Session-> Read ("visitor");
And it does not retrieve anything, I have also tried the check method.
Can anyone see anything here clearly? I have Debug Set 0 (Production) so it uses error 404 () by default.
Has your entire session being lost or are you unable to read that index? ? I am assuming that your entire session is being destroyed. Are you redirecting to the same domain (and subdomain, if applicable) on the page? Most of the time when I have such a problem then it has to be done with cake so that the session can be destroyed, especially if your security. Level set to high / medium
If your session is really being destroyed, make sure that both domains are the same. If this is already the case, to reduce your security level, make sure that you are not being caught by the session. . Referer_check
Otherwise you should definitely be able to read in the filter already. ).
Comments
Post a Comment