Session & subdomain
Posted 10 June 2006 - 01:38 PM
In the home page users can login.
So I want to use a SESSION variable to store his login name and want to redirect him to user.mysite.com.
But the session variable is not available in subdomin user.mysite.com
In my server php.ini is not available.
So i expect a solution thru coding(ie not using configuration file php.ini)
Presently the problem is encountered in Firefox not in IE
Posted 10 June 2006 - 04:47 PM
Posted 10 June 2006 - 06:17 PM
Posted 10 June 2006 - 06:37 PM
Posted 10 June 2006 - 09:44 PM
[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95510\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=95510[/a]
Posted 11 June 2006 - 01:14 AM
You can start by trying this:
Set the [a href=\"http://us2.php.net/session#ini.session.cookie-domain\" target=\"_blank\"]'session.cookie_domain'[/a] to '.mysite.com'. Notice there's a dot before the domain name. This allows the session cookie to be used at www.mysite.com or anysubdomain.mysite.com.
You can use [a href=\"http://us2.php.net/manual/en/function.ini-set.php\" target=\"_blank\"]ini_set()[/a] or [a href=\"http://us2.php.net/manual/en/function.session-set-cookie-params.php\" target=\"_blank\"]session_set_cookie_params()[/a] to set it.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users