I have a problem with the function
$_SESSION['name'] = "foo";
$name = $_SESSION['name'];
echo "My name is $name";
if you are using file sessions you will need to close writing to the session to prevent multiple PHP requests (that need $_SESSION data) from blocking. example:
<?php // start the session session_start(); // I can read/write to session $_SESSION['latestRequestTime'] = time(); // close the session session_write_close(); // now do my long-running code.