hinz Posted May 17, 2006 Share Posted May 17, 2006 Someone pls help me!!something wrong with my session.here is the simple code from internet.<?php// page1.phpsession_start();echo 'Welcome to page #1';$_SESSION['favcolor'] = 'green';$_SESSION['animal'] = cat;/*$_SESSION['time'] = time();*/// Works if session cookie was acceptedecho '<br /><a href="page2.php">page 2</a>';// Or maybe pass along the session id, if neededecho '<br /><a href="page2.php?' . SID . '">page 2</a>';?><?php// page2.phpsession_start();echo 'Welcome to page #2<br />';echo $_SESSION['favcolor']; // greenecho $_SESSION['animal']; // cat/*echo date('Y m d H:i:s', $_SESSION['time']);*/if(isset($_SESSION['username']))return $_SESSION['username'];else// You may want to use SID here, like we did in page1.phpecho '<br /><a href="page1.php">page 1</a>';?> this is the result after I press the link in page1.php.case 1Welcome to page #21970 01 01 00:00:00page 1 this is the result after I press the link in page1.php with session id.case 2Welcome to page #2greencat2006 05 17 12:55:33page 1 y my session cannot display in case 1 in IE ? It work fine in the case 2 using IE. If I use OPERA to test it, it work fine for both cases. pls help me.....:) Quote Link to comment https://forums.phpfreaks.com/topic/9851-_session-problem/ Share on other sites More sharing options...
toplay Posted May 17, 2006 Share Posted May 17, 2006 Make sure you have cookies enabled in the browsers you're testing with and have no extensions that block cookies. Also, make sure that any third party software like network security isn't blocking sessions.Take a look at our session troubleshooting guide:[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=31047&view=findpost&p=157705\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...ndpost&p=157705[/a]Read ALL items in the list. Try just the simple code script in item #10. Quote Link to comment https://forums.phpfreaks.com/topic/9851-_session-problem/#findComment-36608 Share on other sites More sharing options...
hinz Posted May 19, 2006 Author Share Posted May 19, 2006 [!--quoteo(post=374661:date=May 17 2006, 09:35 AM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ May 17 2006, 09:35 AM) [snapback]374661[/snapback][/div][div class=\'quotemain\'][!--quotec--]Make sure you have cookies enabled in the browsers you're testing with and have no extensions that block cookies. Also, make sure that any third party software like network security isn't blocking sessions.Take a look at our session troubleshooting guide:[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=31047&view=findpost&p=157705\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...ndpost&p=157705[/a]Read ALL items in the list. Try just the simple code script in item #10.[/quote]Thanks a lot.. i found the answer!! it just a php.ini setting problem.. Quote Link to comment https://forums.phpfreaks.com/topic/9851-_session-problem/#findComment-37105 Share on other sites More sharing options...
Geof Posted February 19, 2007 Share Posted February 19, 2007 I have the same problem. Can you give me the right link to the session troubleshooting guide. The one in the message never work. Also can you give me what you change in the php.ini.Thank you Quote Link to comment https://forums.phpfreaks.com/topic/9851-_session-problem/#findComment-188352 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.