2
votes

I just moved to a new server.

Previously my apps was on nginx and now apache.

The problem right now is it seems that session in symfony just not working with the new server.

It was working fine in previous nginx server, i'm not sure what kind of server settings that might caused this.

I tested with normal php _SESSION and it's working fine.

When i set a session in an action, i'm able to call it back within that action but when i move to a new module or new page (action) session is gone.

"symfony/user/sfUser/attributes" ["parameters":protected]=> array(0) { } 

Anybody can direct me on how to solve this ?

1
I'd put some debugging statements into the symfony core to see what the issue is. Your sfUser subclass (sfSecurityUser, sfGuardUser?) probably uses sfSessionStorage unless you've configured another session mechanism. Check the init values in initialize as you may have accidentally configured your sessions for a sub-path only, or a very short lifetime, for example.halfer

1 Answers

0
votes

You should use $this->getUser()->setAttribute('var','value');

and get it by $this->getUser()->getAttribute('var');

and you can remove it by $this->getUser()->getAttributeHolder()->remove('var');

you should not use $_SESSION directly just use it through the symfony framework and give us details about factories.yml and the session storage parameters