jeh Posted December 6, 2008 Share Posted December 6, 2008 HI, My project have multiple modules. I have one menu it contains all module tabs. Let us, i login in one module is called 'XXX'. Next i am going to another module is called 'YYY' by clicking menu. In this process session values are working in 'XXX' module. But in 'YYY' module session are losting if url alike 'http://WWW.myurl' but in 'http://myurl' session values are working. How to solve this problem ? If u have any ideas please advice me. Thank in advance, Suman. Link to comment https://forums.phpfreaks.com/topic/135781-session-values-are-losting-in-httpwwwurl-but-it-is-working-in-httpurl/ Share on other sites More sharing options...
redarrow Posted December 6, 2008 Share Posted December 6, 2008 Have u got session_start() written on each page i mean written not included... If u need to use sessions cross scripting use session with a database. Link to comment https://forums.phpfreaks.com/topic/135781-session-values-are-losting-in-httpwwwurl-but-it-is-working-in-httpurl/#findComment-707539 Share on other sites More sharing options...
ashishag67 Posted December 6, 2008 Share Posted December 6, 2008 Please check the things below in order to debug this issue: 1. sesssion_start() should be present at the top of every page wherever session is involved. 2. check by declaring one more session variable and see if the value for that variable is received at the next module. 3. Check if the session variable you are using is not getting a null value while moving from one module to another... visit me at http://www.mysqlandphp.net Link to comment https://forums.phpfreaks.com/topic/135781-session-values-are-losting-in-httpwwwurl-but-it-is-working-in-httpurl/#findComment-707576 Share on other sites More sharing options...
PFMaBiSmAd Posted December 6, 2008 Share Posted December 6, 2008 WWW. is a hostname/subdomain. Please read the 'domain' setting information at this link to find out how to get sessions to work for all hostnames/subdomains of your domain name - http://us3.php.net/manual/en/function.session-set-cookie-params.php Link to comment https://forums.phpfreaks.com/topic/135781-session-values-are-losting-in-httpwwwurl-but-it-is-working-in-httpurl/#findComment-707753 Share on other sites More sharing options...
revraz Posted December 8, 2008 Share Posted December 8, 2008 Or as stated, set the cookie for all domains under your domain name. http://us3.php.net/manual/en/function.session-set-cookie-params.php Link to comment https://forums.phpfreaks.com/topic/135781-session-values-are-losting-in-httpwwwurl-but-it-is-working-in-httpurl/#findComment-709786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.