Welcome Guest, Not a member yet? Register   Sign In
Code Igniter Session problem
#11

[eluser]DiRN[/eluser]
E_ALL is the default. My problem seems to have been the same as theswede's: Internet Explorer doesn't like cookies from servers with incorrect times (this behavior makes sense to me). Updating the time fixed my problem. I'm not sure why changing the error levels corrected it for you, but I'm curious to learn more.
#12

[eluser]Justin Patel[/eluser]
[quote author="DiRN" date="1195983188"]E_ALL is the default. My problem seems to have been the same as theswede's: Internet Explorer doesn't like cookies from servers with incorrect times (this behavior makes sense to me). Updating the time fixed my problem. I'm not sure why changing the error levels corrected it for you, but I'm curious to learn more.[/quote]



I dont know perfectly. But It had solved my problem. When I was keeping it (^ E_ALL) then session was working and for other option I was getting session value NULL.

Try the above method. And let me know. O.W we could try to find new solution.

Thanks
#13

[eluser]DiRN[/eluser]
Sorry, I should have been more clear. I've never changed my setting from the default. It has been E_ALL since day one.

As some lead in, sessions worked properly for me until my server was powered off for about 6 weeks due to a move. After bringing it back online, the problems began. Once I saw theswede's post about ntpdate, I noticed that the time on my server was about 16 hours behind. It wasn't that IE was rejecting the cookies, it was that they were being set to expire based on a time in the past. This behavior makes sense. Quite frankly, I'm surprised Firefox doesn't do the same.
#14

[eluser]JoostV[/eluser]
I had the same problem: session storing fine in Firefox but not in IE.

I checked my server time and it was behind some 8 hours or so. Set it to correct time et voila: sessions running like a breeze!
#15

[eluser]SitesByJoe[/eluser]
In a shared hosting environment (where I'm sure most of our sites/applications reside) it goes without saying that we cannot directly influence the clock on the server (as far as I know that is!).

To circumvent my own cookie experiences I've been setting cookies to last 24 hours. Am I opening a hole doing this?
#16

[eluser]welzie[/eluser]
I have this problem with a shared hosting plan, CI session, and IE6. How do I fix this?

Was this the solution? If so I don't know what that means.
Code:
ntpdate tick.usno.navy.mil

Should I just use native PHP sessions?

P.S. Everything works fine with Firefox, but NOT with IE6
#17

[eluser]Unknown[/eluser]
Hellow guys,

I was having the same problem and it was solved when I fixed the server's clock. But, one question persists: if I am in Brazil, and my application is hosted in USA, where I have 3 hours less from here, my application will not work?

thanks a lot,
#18

[eluser]Nathan Pitman (Nine Four)[/eluser]
It seems I have the very same problem. Everything works a treat in Firefox but both IE6 and 7 throw a wobbly and refuse to accept the cookie. I have checked the time on my server and it is correct... any other ideas? :?
#19

[eluser]Jim Higgins[/eluser]
This thread is old, but I spent the day trying to solve this so I thought I would share what worked for me. Here was my situation...

On my dev environment (XAMPP), all sessions worked fine in FF and IE. As soon as I moved to production, IE7 would not delete a session key I was using. The most common solution I found in these threads was to make sure your server time/date was correct. Mine was correct and it was still not working in IE.

So, I then moved over to using the Native Sessions library from the Wiki (http://codeigniter.com/wiki/Native_session/). This did the trick for the most part with a couple of different additions. Right before I reset the session data in my application code, I needed to unset any existing key with that same value...

$this->session->unset_userdata(array('my_key' => ''));

Lastly, when I moved to the Native Sessions library, I had to change a call in my logout function from sess_destroy() to destroy(). This seemed to be the only inconsistency between using Native Sessions and CodeIgniter's session (for me at least).

The Native Sessions library is one file that just gets dropped into application/libraries

Aside form the destroy(), you load it and call everything the same as the CI Session class.
#20

[eluser]Unknown[/eluser]
None of these methods solved this problem for me. It turns out IE will not use cookies when the host has an invalid character, such as an underscore.

I removed the underscore from my hostname (sub_domain.example.com -> subdomain.example.com) and my sessions worked in all browsers.

More info: Google Search




Theme © iAndrew 2016 - Forum software by © MyBB