Still having session problems
| From: | Patrick Aland | Date: | Tue, 16 Apr 2002 11:38:56 +0000 |
| Subject: | Still having session problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93162@lists.php.net to get a copy of this message | ||
I cannot for the life of me get the new $_SESSION method working.
Running php4.1.2 on apache 1.3.24 on RH6.2 Using the code below:
<?
session_start();
if (!isset($_SESSION["count"]))
{
$_SESSION["count"] = 0;
}
else
{
$_SESSION["count"]++;
}
print($_SESSION["count"]."<BR>\n");
?>
A tmp file is created in /tmp but nothing is put in it.
If I turn register_globals on, the page above still doesn't work, however if I start and
register the session via another page using the old method:
<?
session_start();
if (!isset($count))
{
$count = 0;
}
else
{
$count++;
}
session_register("count");
print($count."<BR>\n");
?>
and then go to the first page it does work and updates the tmp file. Any
There is a bug for similar behavior in 4.1.2 on Windows but I don't see
a reference to the linux version.
Any ideas? Thanks.
--
------------------------------------------------------------
Patrick Aland paland@stetson.edu
Network Administrator Voice: 386.822.7217
Stetson University Fax: 386.822.7367
------------------------------------------------------------