Thanks for your reply Eno.

I check if the session exists (ie I create a new session only if  
session_id() returns an empty string).
I didnt know that getAttribute and setAttribute will not work if i  
turn off session auto_start. What should I do to have it persist the  
complete session information?

(I didnt know turning off auto_start also turned off saving session  
data at the end of the request. This might be the explanation why  
flash doesnt work since it also uses the setAttribute, getAttribute  
calls)

Any Symfony developers here that can answer this question?
Thanks
Balaji

On May 6, 2008, at 9:50 PM, Eno wrote:

>
> On Mon, 5 May 2008, Balaji Srinivasan wrote:
>
>> So I turned off session. auto_start in factories.yml.
>> In my preExecute method, I set up a session using session_id() call.
>>
>> Now it looks like the flash parameters are no longer being carried
>> from one call to the next. Also somehow the session itself doesnt get
>> restored on the next call (ie. If I add an attribute to the session
>> using $this->getUser()->setAttribute(), I cannot retrieve it in the
>> next call).
>
> preExecute() gets called for every action, so do you check for an  
> existing
> session to use and use it or create a new one each time?
>
> Im also guessing switching off symfony's session handling means you  
> dont
> get to use methods like getAttribute() and setAttribute(). Probably  
> you'll
> need to write your own methods to handle storing and retrieving  
> session
> data instead of using Symfony's.
>
>
> -- 
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to