Quantcast

Session is dissappearing?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Session is dissappearing?

mrwooster@gmail.com

Hi,

So far I have not had any problems with cakePHP's sessions, however I
have come accross a bit of an issue which is really bugging me.

One of my pages on my site uses a form and a small javascript code to
encode some POST values and autosubmit the form, forwarding the user to
another part of the website. However, on the page where the user is
forwarded to, I cannot access any of the session variables, it is as if
the session has been deleted.

I called print_r($_SESSION); on each page, on the first page it gives a
nice array of all my session variables, but on the second page I only
get Array ( [Config] => Array ( [rand] => 16766 [time] => 1165097665
[userAgent] => 6d7d28e0b3c1cd5730a7ad56acb73dc5 ) ) .


Nowhere do I call session->Destroy, so I can't understant why the
session is getting obliviated!


Any help would be great - thanks


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Session is dissappearing?

MJ Ray-3

"[hidden email]" <[hidden email]> wrote: [...]
> encode some POST values and autosubmit the form, forwarding the user to
> another part of the website. However, on the page where the user is
> forwarded to, I cannot access any of the session variables [...]

IIRC, the session is usually controlled by a cookie or an ending on
the GET which is interpreted by CakePHP.  If you forward them to
another part of the web site, either the cookie won't be sent, or
CakePHP isn't involved to decode the GET query into a session.

If you're using cookie-based sessions, you can probably override the
session cookie path somewhere, but I forget exactly where.

Hope that helps,
--
MJ Ray <[hidden email]>  www.ttllp.co.uk  +44-870-4321-9-10
Web, localisation, koha, databases, GNU/Linux and statistics.
Registered in England and Wales, partnership number OC303457

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...