1.

Solve : Why isn't the php session working on the subdomains??

Answer»

Hi. I am making a website builder, and for some REASON, when I make a session on site.com, then the session doesn't work on builder.site.com.

The CODE I am using in front of every page is:
Code: [Select]session_set_cookie_params(1440, "/", ".red-host.org", false, false);
session_start();
HEADER("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");

And the code that MAKES the session is:
Code: [Select] session_set_cookie_params(1440, "/", ".red-host.org", false, false);
session_start();
$_SESSION[$_SESSION_NAME]="$_POST[username]";
Any advice or help would be appreciated. Thanks.It's because the session_start() function uses a COOKIE for authentication, and the cookie is only stored for the builder.site.com path.Oh, so how can I fix this issue?



Discussion

No Comment Found