title: nodejs cant read phpsessid and return error undefined
body: <p>i just did like <a href="http://simplapi.wordpress.com/2012/04/11/php-nodejs-session-share-memcache/" rel="nofollow noreferrer">this article</a> to read session in nodejs and read sessions data from memcached.but i had some problem to read data back from phpsessid.when i node this index.js script</p>
  <pre><code>var app = require(&quot;http&quot;).createServer(handler),
      fs = require(&quot;fs&quot;),
      memcache = require(&quot;memcache&quot;),
      co = require(&quot;./cookie.js&quot;);
  
  app.listen(7070);
  
  //On client incomming, we send back index.html
  function handler(req, res){
      fs.readFile(__dirname + &quot;/index.html&quot;, function(err, data){
          if(err){
              res.writeHead(500);
              return res.end(&quot;Error loading index.html&quot;);
          }else{
              res.writeHead(200);
              res.end(data);
          }
      });
  
  
      //Using php session to retrieve important data from user
      var cookieManager = new co.cookie(req.headers.cookie);
  
      var client = new memcache.Client(11211, &quot;localhost&quot;);
      client.connect();
  
      client.get(&quot;sessions/&quot;+cookieManager.get(&quot;PHPSESSID&quot;), function(error, result){
          console.log(&quot;error : &quot;+error);
          if(typeof(error)===&quot;undefined&quot;){
              var session = JSON.parse(result);
          }
      });
  }
  </code></pre>
  <p>and access this script console log show this error : undefined message.i want to access session data and need help in this.</p>
  <p>thanks in advance</p>