r0k3t Posted January 2, 2007 Share Posted January 2, 2007 Hi there, I have researched many a thread on this but still haven't found the answer. This happens with ie6 and 7. For some reason maybe one out of eight times my sessions work mostly though I just have a problems with it I do a phpinfo(); and I can see that the session ID is different. Everything always works in firefox just not IE. I tried setting "session.auto_start = 1" no help, I tried setting "session.use_trans_sid = 1" doesn't help either. What gives... I mean sessions are not that hard to deal with... All you have to do is call session_start() if auto_start = 0 and $_SESSION['blah'] = "blah" or in my case if you are passing objects around you serialize them first... How could this be so frustrating. Also - A tried to donate but I can't log in there, I can log in just fine for this part but that part always tells me I am not logged in and that my login failed. What's up with that? I would like to donate but heck yeah I want some glory for it!ThanksKen Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/ Share on other sites More sharing options...
ober Posted January 2, 2007 Share Posted January 2, 2007 Just go directly to paypal and post your receipt.As far as the sessions question... can you post your code? Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/#findComment-151616 Share on other sites More sharing options...
marcus Posted January 2, 2007 Share Posted January 2, 2007 Try echoing off your sessions and see if they are even set. You can always try to change your session expire time. Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/#findComment-151620 Share on other sites More sharing options...
r0k3t Posted January 2, 2007 Author Share Posted January 2, 2007 Yeah, I tried echoing my session variables... The problem is that the session array is empty and I have a new session id "almost" everytime with IE 6 and 7, every once in a while it will work. I am totally stumped, here is some code. ---------from login.php------------------------if($num_rows == 1){ $userObject = new user; $row = mysql_fetch_array($result); $userObject->setUserName($row['username']); $userObject->setAuthLevel($row['authlevel']); $serializedUserObj = serialize($userObject); $_SESSION['userObject'] = $serializedUserObj; ?> <a href='http://fedora5/tfgmanager.02/mainMenu.php'> Click to continue </a> <? echo $_SESSION['userObject']; //phpinfo(); //header( 'Location: http://fedora5/tfgmanager.02/mainMenu.php' );} else { include('./htmltop.php'); echo "<p id='error'>Sorry, there has been a login error</p>";}------from mainMenuTop.php (which is an include in mainMenu.php) ------------------<?session_start();include('./htmltop.php');include('./classes/class.user.php');$serializedUserObj = $_SESSION['userObject'];echo $serializedUserObj;$userObject = unserialize($_SESSION['userObject']);if(isset($_POST['menu'])){ $menu = $_POST['menu'];} Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/#findComment-151656 Share on other sites More sharing options...
r0k3t Posted January 3, 2007 Author Share Posted January 3, 2007 HiDoes anyone have any info that might point me in the right direction? I tried implementing a p3p policy... It seems to work fine but doesn't solve the problem. Like I said, it works in firefox every time and once about every ten tries it will work in ie6 or 7. ie always tells me the cookie has been accepted! Why would it work in firefox and NOT ie (usually)?*shrug* I don't know what else to do but abandon phpKen Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/#findComment-152196 Share on other sites More sharing options...
PFMaBiSmAd Posted January 3, 2007 Share Posted January 3, 2007 I notice a header(...) redirect in your code (commented out, probably for testing purposes). Put an [b]exit;[/b] statement after any header redirects to prevent the code following it from being executed.Also, is any of this switching back and forth between http and https pages? Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/#findComment-152208 Share on other sites More sharing options...
r0k3t Posted January 5, 2007 Author Share Posted January 5, 2007 Yeah, as you can see I totally tried that. I tried just creating a link to the main page after you log in but that doesn't solve the problem. It actually works either way in firefox and like I said "every once in a while will work either way in IE" yesterday I used IE6 and logged in twice and everything worked just fine then it stopped working? I listed the versions of php below maybe that will help someone point me in the right direction.php-ldap-5.1.6-1.2php-mysql-5.1.6-1.2php-pear-1.4.6-2php-5.1.2-5php-pdo-5.1.6-1.2php-odbc-5.1.6-1.2Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/32599-ie-session-problems/#findComment-153491 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.