Question

I'm using this package to replace cookied sessions so that my facebook application will still work.

https://github.com/nicolasff/phpredis

I need to not use cookies for sessions, but even with the redis solution, it will only persist if cookies are enabled.

Is there a way to persist redis storage WITHOUT cookies?

Thanks!

Était-ce utile?

La solution 2

I ended up catching up the session_id(), sending it via Javascript. Using

$.ajaxSetup({ data: sessionId });

To make every ajax call send the sessionID

Then, using

if(isset($_REQUEST['sessionId'])) session_id($_REQUEST['sessionId']));

To set the session. Cookies are now avoided.

Autres conseils

Cookies are required for most session solutions because the browser has to send a unique identifier to the server indicating who the user is. In lieu of cookies, you'd have to pass around the session identifier on the URL as a querystring parameter whenever the user clicks a link/submits a form etc.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top