Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Check the value of session.cookie_domain in your php.ini file. If that value is set, make sure it's what you'd expect. That's the biggest thing I can think of which could behave differently locally vs remote.</p> <p>Also, if you have a value set to session.cookie_lifetime, try commenting that line out in your php.ini. I saw some peculiar behavior with IE when I dropped a value in there.</p> <p>Here's a quickie session checker. If you reload the page and keep seeing new values for the token, you're not getting a persistent session. Then you can definitely blame the server/PHP config and not your code.</p> <pre><code>&lt;?php session_start(); if (!isset($_SESSION['token'])) { $_SESSION['token'] = sha1(uniqid(rand(), true)); } if (!empty($_POST)) { $_SESSION['hi'] = preg_replace('/[^\w ]+/','',$_POST['hi']); header("Location: index.php"); exit; } ?&gt; &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Session test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;How's that session doing?&lt;/h1&gt; &lt;p&gt;Message: &lt;?=htmlspecialchars($_SESSION['hi'])?&gt;&lt;/p&gt; &lt;p&gt;Token: &lt;?=htmlspecialchars($_SESSION['token'])?&gt;&lt;/p&gt; &lt;form action="index.php" method="post"&gt; &lt;fieldset&gt; &lt;label for="hi"&gt;What do you have to say?&lt;/label&gt; &lt;input type="text" name="hi" id="hi"&gt; &lt;input type="submit" value="Submit"&gt; &lt;/fieldset&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload