My site has an index page, and that page checks if a php session is set with:
session_start();
$name = $_SESSION["name"];
if (!$name) {
header('Location: name.php');
}
name.php has a simple form to set the name (no php), with an action of setName.php.
setName.php:
session_start();
$_SESSION["name"] = $_POST["name"];
header('Location: index.php');
In every browser except safari (and Webkit Nightly), the user sets their name, and is taken back to the index. However, in S(&WN) Submitting the name form loops back to the same page.
Cookies are enabled for all sites, and the session id is being set:

Edit: In case this makes any difference, my server is a macbook running MAMP with php 5.3.
If you want to try it yourself, the url is 121.73.150.105/questions, but it is often offline.
This may not be the cause of your troubles, but here’s what the PHP manual has to say about “Location”:
PHP manual