title: WordPress session problems
body: <p>I have found a bunch of articles talking about using sessions.
  From what I have been able to find the best way is to add an init action.
  I have been following this article
  <a href="http://devondev.com/2012/02/03/using-the-php-session-in-wordpress/" rel="nofollow noreferrer">http://devondev.com/2012/02/03/using-the-php-session-in-wordpress/</a></p>
  <p>But I must be missing something. every time I call the page with my plugin there is no session id.</p>
  <p>Am I missing something?</p>
  <p>thanks for any help</p>
  <pre class="lang-php prettyprint-override"><code>add_action('init', 'my_GB_StartSession', 1);
  add_action('wp_logout', 'my_GB_myEndSession');
  add_action('wp_login', 'my_GB_myEndSession');
  if (!function_exists('my_GB_StartSession')) {
      function my_GB_StartSession() {
          if(!session_id()) {
              errorLog(&quot;session starting\n&quot;);
              session_start();
          }
      }
  }
  function UnitNet_GB_myEndSession() {
      session_destroy ();
  }
  </code></pre>