SSL üzerinden. Chrome / Firefox çalışıyor ama Opera / Safari / IE için sessionTestVariable için boş bir değeri gösterir:
<? // https://mydomain.com/setSession.php
session_cache_limiter( 'nocache' );
session_set_cookie_params("899", "/", ".mydomain.com");
session_start();
unset($_SESSION['sessionTestVariable']);
// Set sessionTestVariable
$_SESSION['sessionTestVariable'] = "some string";
header("Cache-Control: no-cache, must-revalidate, post-check=3600, pre-check=3600"); // CacheBusting
header("Location: http://mydomain2.com/testSession.php");
exit; // this *should* fix the problem but does not
?>
/ / / / / / / / / / / /
<? // http://mydomain2.com/testSession.php
echo "Testing to see if we can trigger the session from mydomain.com";
echo "<script type=\"text/javascript\" src=\"https://mydomain.com/triggerCookie.php\">";
?>
/ / / / / / / / / / / /
<? // https://mydomain.com/triggerCookie.php
session_cache_limiter( 'nocache' );
session_set_cookie_params("899", "/", ".mydomain.com");
session_start();
// Set sessionTestVariable
echo "alert('session: " . $_SESSION['sessionTestVariable'] . "');";
session_destroy();
?>