homepage Welcome to WebmasterWorld Guest from 54.234.7.161
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Sessions in folders
fahad direct



 
Msg#: 4125394 posted 1:20 pm on May 1, 2010 (gmt 0)

I have an issue and unable to get the solution if anyone can help me please:

There is a subdomain abc.example.com having login link for SignIn once one signs In a session is created as:

session_start();
$_SESSION['client']="store my session value";

and in my file .htaccess of the same subdomain abc i have .htaccess file having the code as:

php_value session.cookie_domain ".abc.example.com"

I am doing mode rewrite so even it is working fine there and i can share the same session from one subdirectory to another even on root but it is being losed if i am accessing from one more inner folder inside abc subdirectory.

It works fine only upto the levels of subdirectories but if there are further folders inside, sessions are being losed

[edited by: lammert at 5:18 pm (utc) on May 3, 2010]
[edit reason] changed domains to example.com [/edit]

 

lammert

WebmasterWorld Senior Member lammert us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4125394 posted 12:12 pm on May 3, 2010 (gmt 0)

Hi fahad, I may be a little bit confused, so maybe you are able to explain a little bit more to me. Are you talking about cookies not shared between subfolders, or between subdomains?

According to the original Netscape Cookie specification, sharing between different sub domains must be possible, even if the tail of the domain contains more than one step. For example def.xyz.abc.example.com and xyz.def.abc.example.com should receive the same cookies, if the cookie domain has been set to .abc.example.com.

fahad direct



 
Msg#: 4125394 posted 8:10 pm on May 3, 2010 (gmt 0)

Hi Lammert,
Thanks it works now but in one page only it is losing session value. Not getting why it is losing the value there where in all subdomains and subfolder being accessed.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved