title: PHP session_start function and CLI
body: <p>Function session_start used in PHP CLI print the next warning: <code>session_start(): Cannot send session cookie - headers already sent by (output started at /home/robi/p/test.php:1) in /home/robi/p/test.php on line 2</code> why?</p>
  <p>I want to log all the client entries in a variable and check this out to see if i get forgery from a specific remote address by comparing the time user last entry and current entry time! Am I doing it wrong?</p>
  <p>here is my code:</p>
  <pre><code>&lt;?php 
  session_start();
  $client_entry = time();
  $_SESSION[&quot;entries&quot;][] =  $client_entry;
  $entries = $_SESSION[&quot;entries&quot;];
  
  
  $check_out = array_filter(
      $entries,
      function($value) use($client_entry) {
          return ($value &gt;= ($client_entry + (1 * 0.6)));
      }
  );
  </code></pre>