title: How to make Symfony2 read php native session directly
body: <p>I have a Symfony2 app and I have to read the sessions set from another, non-symfony app. </p>
  
  <p>The non-symfony app just set its sessions into <code>$_SESSION</code>, as usual.</p>
  
  <p>However, when I attempt to read this session, the data isn't there. No matter I do it by </p>
  
  <pre><code>$session = $this-&gt;get('request')-&gt;getSession();
  var_dump($session-&gt;all());
  </code></pre>
  
  <p>or even (I know I shouldn't do this, but anyway)</p>
  
  <pre><code>var_dump($_SESSION);
  </code></pre>
  
  <p>and this gives me session already started error, and I have no idea why there is error despite I have never started session in the Symfony app. Tells me if this way actually work so that I can look into <code>session_start()</code> thing.</p>
  
  <pre><code>$session = new Session();
  $session-&gt;start();
  var_dump($session-&gt;all());
  </code></pre>
  
  <p>The <code>PHPSESSID</code> cookie is set in the Symfony2 app and its value is the same as the cookie set in the non-symfony app, but my Symfony2 app just refuse to read the content of the session. (<code>$session-&gt;getName()</code> returns <code>PHPSESSID</code>, to be clear)</p>
  
  <p>(To be exact, both apps are under same domain but different subdomains, and I have already set <code>framework.session.domain</code> correctly in <code>app/config.yml</code> in Symfony app and called <code>session_set_cookie_params</code> on the non-symfony app to have the same domain setting to allow sharing session cookie between subdomains i.e. <code>.example.com</code>)</p>
  
  <p>So how do you read sessions in a Symfony2 app/Controller that is set by a non-symfony app? Thanks.</p>
  
  <p>I am using Symfony 2.1, if this matters.</p>