title: Session_set_save_handler not setting
body: <p>I'm having issues with setting session_set_save_handler. I configured my php.ini to session.handler = user</p>
  
  <p>This simple test is failing:</p>
  
  <pre><code>//Define custom session handler
  if(session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write",     "sess_destroy", "sess_gc")){
  die('set fine');
  }else{
  die('Couldn\'t set session handler');
  </code></pre>
  
  <p>Here is my session class.</p>
  
  <pre><code>//Constructor
  function __construct(){
  
  //Define custom session handler
  if(session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc")){
      die('set fine');
  }else{
      die('Couldn\'t set session handler');
  }
  
  //Start session
  session_start();
  }
  
  
  //Custom session functions
  function sess_open($sess_path, $sess_name) {
  
  return true;
  }
  
  function sess_close() {
  
  return true;
  }
  
  function sess_read($sess_id) {
  
  //Query for session record in
  $results = $db-&gt;QuerySingleRow("SELECT data FROM sessions WHERE session_id = '$sess_id'");
  
  //Check that record is returned
  if ($results != false)
  {
      //Session found, pull out data field value
      $sess_data = $results-&gt;data;
  
      //Grab current time
      $CurrentTime = time();
  
      //Update session record with current timestamp
      $db-&gt;Query("UPDATE sessions SET last_updated = $CurrentTime WHERE session_id = '$sess_id'");
  
      //Return 
      return $sess_data;
  }
  else
  {
      //No session found
  
      //Grab current timestamp
      $CurrentTime = time();
  
      //Insert new session to DB
      $db-&gt;Query("INSERT INTO sessions (session_id, last_updated) VALUES ('$sess_id', $CurrentTime)");
  
      //Return blank per nature of session_set_save_handler read()
      return '';
  }
  }
  
  function sess_write($sess_id, $data) {
  
  //Grab current timestamp
  $CurrentTime = time();
  
  //Update session record to hold new data and update last_updated field
  $db-&gt;Query("UPDATE sessions SET data = '$data', last_updated = $CurrentTime WHERE session_id = '$sess_id'");
  
  return true;
  }
  
  function sess_destroy($sess_id) {
  
  //Delete session from DB
  $db-&gt;Query("DELETE FROM sessions WHERE session_id = '$sess_id'");
  
  return true;
  }
  
  function sess_gc($sess_maxlifetime) {
  
  //Get current timestamp
  $CurrentTime = time();
  
  //Delete from session based on garbage collection
  $db-&gt;Query("DELETE FROM sessions WHERE last_updated &lt; $CurrentTime");
  
  return true;
  }
  
  
  }
  </code></pre>
  
  <p>The only thing I can think of is $db is an suppose to be an object of my MySQL DB class but I can't include the class and then create an instance of it.</p>
  
  <p>I didn't want to reinvent the wheel on the DB class so I grabbed it from Jeff Williams here: <a href="http://www.phpclasses.org/package/3698-PHP-MySQL-database-access-wrapper.html" rel="nofollow">http://www.phpclasses.org/package/3698-PHP-MySQL-database-access-wrapper.html</a></p>
  
  <p>I've tried to include it out side the class body put then the page doesn't render, just a blank white page no errors.:</p>
  
  <pre><code>&lt;?php
  include 'mysql.class.php';
  $db = new MySQL(true);
  
  class session
  {
  
  //Constructor
  function __construct(){
  ....
  </code></pre>