Welcome Guest, Not a member yet? Register   Sign In
CI 3.1.1 Session not kept
#1

HI 

I had updated to CI 3.1.1 and i had a problem with session not being kept from 2 urls. If i rollback to codeigniter 3.1.0 works ok.

is there any info on session for the upgrade?
 
PHP Code:
class Test extends CI_Controller {
 

 
public function index(){
  
$this
->session->set_userdata('key',"val1");
var_dump($this->session->userdata);

echo 
"hi";
 

}
public function 
p(){
var_dump($this->session->userdata);
}



Thanks
Reply
#2

ci_sessions -> id col -> VARCHAR(128)... it was VARCHAR(40)
Reply
#3

(This post was last modified: 10-27-2016, 08:07 AM by Narf.)

Please test if these fix it:

https://github.com/bcit-ci/CodeIgniter/c...6428c09fb6
https://github.com/bcit-ci/CodeIgniter/c...8fb2a8c2a8

(10-25-2016, 09:36 PM)SomeGuy Wrote: ci_sessions -> id col -> VARCHAR(128)... it was VARCHAR(40)

Shouldn't matter for PHP_VERSION < 7.1
Reply
#4

(10-27-2016, 06:44 AM)Narf Wrote: Please test if these fix it:

https://github.com/bcit-ci/CodeIgniter/c...6428c09fb6
https://github.com/bcit-ci/CodeIgniter/c...8fb2a8c2a8

(10-25-2016, 09:36 PM)SomeGuy Wrote: ci_sessions -> id col -> VARCHAR(128)... it was VARCHAR(40)

Shouldn't matter for PHP_VERSION < 7.1

Just spreading the word. Is it handled automagically if it's >= 7.1? I haven't dug through the code and just updated ci_sessions manually in my CI installs.
Reply
#5

(10-27-2016, 10:26 AM)SomeGuy Wrote: Just spreading the word. Is it handled automagically if it's >= 7.1? I haven't dug through the code and just updated ci_sessions manually in my CI installs.

Are you asking if CI would automatically alter the table? No.
It doesn't need to. Even on PHP 7.1, the default sid_length is 32.
Reply
#6

Ah ok, good to know. Now I'm just wasting space in my db Wink
Reply




Theme © iAndrew 2016 - Forum software by © MyBB