title: Opera 11.50 file write on page reload issue and cookies, php session errors
body: <p>I have a problem which I can't understand. </p>
  
  <p>The problem occurs only on Opera 11.50 browser. I have simply write to file function. 
  <code>fopen, LOCK_EX, fputs, LOCK_UN, fclose</code>.</p>
  
  <p>When I normally open pages, everything is ok. But when I reload page, then string is write to file multiple times (2, sometimes 3). I checked,
  Function is fired only once, and echo return correct string.</p>
  
  <p>Also on refresh, Opera ignores php session variable and cookies. Of course I use buffer
  before session start. </p>
  
  <p>For any other browser, this problems does not occur. </p>
  
  <p>I checked the cookies and browser settings. Also reinstalled browser. On
   the second PC with freshly downloaded and installed opera 11.50 is the same problem.</p>
  
  <p>Any ideas?</p>
  
  <p>ps: I read <a href="https://stackoverflow.com/questions/11869902/cookies-not-being-sent-back-and-forth-properly-in-opera">this</a> related topic, but I have not found the answer for my problem there.</p>
  
  <p>There is some code:</p>
  
  <pre><code>if (!isset($_SESSION['foo']) &amp;&amp; ($check4 === false) &amp;&amp; !isset($_COOKIE['bar'])) {
  
       echo "test!";
  
       $fileHandler = fopen(MASTER_PATH . "/data/logs/loger.txt", "ab");
       flock($fileHandler, LOCK_EX);
       fputs($fileHandler, "What?!");
       flock($fileHandler, LOCK_UN);
       fclose($fileHandler);
  
       $_SESSION['foo'] = true;
       $check4 = true;
       setcookie("bar");
  }
  </code></pre>
  
  <p>When normally enter page everything is ok. When reload echo "test!" isn't run, but in the file appear two entries "What?!". Only this function has output to that file.</p>