title: Opentok php server sdk, session and token not working
body: <p>I need help for my Php server in opentok
  this is my online website that i created</p>
  
  <p><a href="http://mrsvideocall.bugs3.com/Engine.php" rel="nofollow">mrsvideocall.bugs3.com/Engine.php</a></p>
  
  <p>the url above gives you session and token</p>
  
  <p>it has output session id and token but..
  when i tried that output. the token and the session is not connecting</p>
  
  <p>if you want to try
  you can use my apikey and api secret this was just my trial account</p>
  
  <p>api key : 45007972</p>
  
  <p>api secret: xxxxxxxxxxxxxxxxxxxxxxx</p>
  
  <p>try it. .it wont work</p>
  
  <p>I dont know why.</p>
  
  <p>this the code inside my php file. .is there anything wrong?</p>
  
  <pre><code>&lt;?php
  require "vendor/autoload.php";
  
  use OpenTok\OpenTok;
  use OpenTok\Session;
  use OpenTok\Role; 
  use OpenTok\MediaMode;
  
  $API_KEY = "45007972";
  $API_SECRET = "xxxxxxxxxxxxxxxxxxxxxxx";
  $opentok = new OpenTok($API_KEY, $API_SECRET);
  
  // Create a session that attempts to use peer-to-peer streaming:
  $session = $opentok-&gt;createSession();
  $session = $opentok-&gt;createSession(array('mediaMode' =&gt; MediaMode::ROUTED ));
  // Store this sessionId in the database for later use
  echo $sessionId = $session-&gt;getSessionId();
  
  // Generate a Token from just a sessionId (fetched from a database)
  $token = $opentok-&gt;generateToken($sessionId);
  // Generate a Token by calling the method on the Session (returned from createSession)
  $token = $session-&gt;generateToken();
  
  // Set some options in a token
  echo $token = $session-&gt;generateToken(array(
  'role' =&gt; Role::PUBLISHER,
  'expireTime' =&gt; time()+(7 * 24 * 60 * 60), // in one week
  'data' =&gt; 'name=Eleo'
  ));
  </code></pre>
  
  <p>if i just make session and token at dashboard it was working
  but when i tried the result of my token and session generator it does not work
  it has result but not working</p>