PHP Session not saving/storing
<p>For a project, I am creating a web app, in which, login will be a paramount part. Unfortunately, I seem to be unable to get sessions to work properly, so the sign-ins do not last at all.
Here is some simple code I wrote on my <a href="http://alexandstein.com/Testing/" rel="nofollow">Testing/experimentation/debugging page.</a></p>

<p>Here is the head of the testing page.</p>

<pre><code>&lt;? 
if(!isset($_SESSION)){
    session_start(); 
}
?&gt;
&lt;!DOCTYPE html&gt;
...
</code></pre>

<p>Here is the code which uses session data.</p>

<pre><code>$_SESSION[0] = $_SESSION[0] + 1;
echo($_SESSION[0]);
</code></pre>

<p>It's supposed to increment with each, visit, but it hasn't been doing so, as with the login system.</p>

<p>Here is session setting from the <code>phpinfo()</code> function if it helps.</p>

<pre><code>Session Support enabled
Registered save handlers    files user sqlite
Registered serializer handlers  php php_binary wddx

Directive   Local Value Master Value 
session.auto_start  Off Off
session.bug_compat_42   On  On
session.bug_compat_warn On  On
session.cache_expire    180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no value    no value
session.cookie_httponly Off Off
session.cookie_lifetime 0   0
session.cookie_path /   /
session.cookie_secure   Off Off
session.entropy_file    no value    no value
session.entropy_length  0   0
session.gc_divisor  100 100
session.gc_maxlifetime  1440    1440
session.gc_probability  1   1
session.hash_bits_per_character 4   4
session.hash_function   0   0
session.name    PHPSESSID   PHPSESSID
session.referer_check   no value    no value
session.save_handler    files   files
session.save_path   /tmp    /tmp
session.serialize_handler   php php
session.use_cookies On  On
session.use_only_cookies    On  On
session.use_trans_sid   0   0
</code></pre>
