I'm running php on an Apache2 server with virtual hosts. I have 2 domains, let's say domain1.com and domain2.com (NOT subdomains)
domain2.com is a ServerAlias of domain1.com
The session on domain1.com is working just fine. However, I can't get session variables to save on domain2.com.
I don't believe my session is saving, because it's not carrying over between pages. I set the variables on my index.php page. I can dump the session and see that it was initially set. Then my index.php redirects to home.php where I have this at the top of home.php
<?php
session_start();
var_dump($_SESSION);
?>
I'm getting an empty array on home.php
My phpinfo() settings are exactly the same for my session information on the 2 domains.
I'm stuck, not sure if this is a php issue, or an apache setting. Any help is greatly appreciated!