Thanks.

It turned out the problem was due to the way the browsers handle
HTTP_REFERER. I had to put in a kluge for Webkit browsers that would
use a javascript redirect so that the referers were from the same
domain before the session got created. Icky but functional for now.



On Oct 9, 3:10 pm, Miles J <[email protected]> wrote:
> Try turning checkAgent to true. The session security might be killing
> it.
>
> On Oct 9, 11:52 am, osodani <[email protected]> wrote:
>
> > Hi,
>
> > I've read through a dozen similar threads but I can't get sessions to
> > work with WebKit-based browsers. I've tested Safari 4, Chrome, WebKit,
> > and even the iPhone Safari. I've tested on different PCs and Macs.
> > Firefox and IE work fine. I'm running CakePHP 1.2.5.
> > Here are the core.php values I've tried modifying:
>
> >         Configure::write('Session.save', 'php');
> >         Configure::write('Session.checkAgent', false);
> >         Configure::write('Security.level', 'medium');
>
> > I've simplified the code down to:
>
> > Upon login, I call
> >         $this->Session->write('Success', true);
>
> > On the same request, I call
> >         pr($this->Session->read());
>
> > which correctly outputs:
>
> > Array
> > (
> >     [Success] => 1
> > )
>
> > In the view, I display a link to another view (/login/test) on the
> > same controller:
>
> >         function test()
> >         {
> >                 pr($this->Session->read());
> >                 exit();
> >         }
>
> > On Firefox and IE, this correctly outputs (again) the array shown
> > above.
> > On Safari and Chrome, nothing. The Session is empty.
>
> > Can anyone spot what I'm doing wrong? I've tried this 20 different
> > ways with different settings in core.php, cleaning cookies and cache
> > in the browsers, but I can't seem to keep the Session alive.
>
> > Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to