Welcome Guest, Not a member yet? Register   Sign In
Session problem
#1

[eluser]helloworld7[/eluser]
Hi. I'm using CI 1.7.3 and having session problem on firefax. IE seems fine though.

I found notes about native session and I quickly download latest CI 2.0.2.

I also did what it said on native session.

Overwrite, current session.php with the native session then replace class and function name that has native session with session instead.

But then I got this message which I've no clue how to resolve this. Anyone can help me out on this? Thank you.


A PHP Error was encountered

Severity: Warning

Message: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\syncupasia\system\libraries\Session.php:242)

Filename: libraries/Session.php

Line Number: 140
A PHP Error was encountered

Severity: Warning

Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\syncupasia\system\libraries\Session.php:242)

Filename: libraries/Session.php

Line Number: 140
#2

[eluser]toopay[/eluser]
Clearly from your error log, your "native" session not working at all. I will working on old (default session class) version of it, instead try to put something that not fit with the rest of the system itself.

If your problem with your session class is related with some environment issue( like browser) at the first place, that would be easier to debug and fix rather than modify a class that not fit at all with your whole system.
#3

[eluser]helloworld7[/eluser]
Finally got it working now.

In case for those who want to do native session with 2.0.2

Just copy the native_session.php file to your application/libraries/ and rename it as Session.php

Then change the class name and constructor name to CI_Session

Also add the following then it should work fine.

function sess_destroy()
{
$this->destroy();
}




Theme © iAndrew 2016 - Forum software by © MyBB