I have read many forums (including this one) about passing session variables between subdomains, and I can't get this to work. Can someone explain what I am missing?
Step 1 In the php.ini file: session.cookie_domain = ".mydomain.com" Verified with phpinfo() that I am using the right php.ini file
Step 2 In page at www.mydomain.com set a session variable $_SESSION['a'] , verify that it appears by calling it on the next page (it does). Clink link to sub.mydomain.com
Step 3 Page at sub.mydomain.com checks if session variable is set using:
$a = $_SESSION['a']; if(!isset($_SESSION['a'])){ echo "Error: Session Variable not available"; }
Unfortunately I am getting my error message. What am I missing? Thanks in advance for help.