access session by subdomains

SpeellLoT

New Member
hello i have a problem with accessing a session on a subdomain. the session will be set on domain.com by using this code:\[code\]<?phpob_start();ini_set("session.cookie_domain",".domain.com");session_start();header ("Content-Type: text/html; charset=utf-8");....\[/code\]so adding a point in front of the domain should probably set the session even for subdomain.i had a look at the phpinfo wwhere i found this line:\[code\]session.cookie_domain no value no value\[/code\]because of the hosters setting i have no chance to edit the php.ini file. so i had to add the ini_set line on all files like above.the problem is the following: when i will call domain.com a session will be set. i built a testpage that easily echo out the session and cookie. as i said the session will be set on domain.com and when i will call domain.com/testfile.php it will be shown correctly. but when i will call www.domain.com/testfile.php just the cookie will be displayed but not the session, that is empty. there is also added the ini_set line on testfile.php.so i have no clue why this doesnt work? i also deleted the cache and browser history several times but doesnt changed anything. i also tried differnt browsers.if there is someone who could give me hints i really would appreciate.thanks alot.
 
Back
Top