I had to inherit from sfSessionStorage to make it work.. Also, I just couldn't get it to work with domain limitations in that Explorer seems to send the cookies of the main domain to all subdomains. So I had to use a subdomain-based session name Here is the code bit, at the end it came out pretty simple, but I used hours trying to get it to work with domain limiting the cookies
class mySessionStorage extends sfSessionStorage { /** * This override sets the exact (sub)domain for session cookie and then initializes this Storage instance. * * @param sfContext A sfContext instance * @param array An associative array of initialization parameters * * @return boolean true, if initialization completes successfully, otherwise false * * @throws <b>sfInitializationException</b> If an error occurs while initializing this Storage */ public function initialize($context, $parameters = null) { // $parameters['session_cookie_domain'] = $_SERVER['SERVER_NAME']; // This doesn't work $parameters['session_name'] = 'symfony_'.$_SERVER['SERVER_NAME']; // This works // initialize parent parent::initialize($context, $parameters); } }
logs
8010.8 KB