I am having a really hard time getting session to work on my develpment machine.
The following code works no problem on my commercial host but returns nothing on my machine.
<?php
session_start();
$url_sid = "?" . $PHPSESSID;
$user_name = "None";
$validated = "No";
session_register("url_sid");
session_register("user_name");
session_register("validated");
?>
<?php
echo "URL SID: " . $_SESSION["url_sid"] . "<br>";
echo "User Name: " . $_SESSION["user_name"] . "<br>";
echo "Validated: " . $_SESSION["validated"] . "<br>";
?>
I suspect that it is a configuration problem of some kind but I can't figure out what I need to change to get this to work.
I am running Mac OS X with Apache and PHP 4.