CodeIgniter Forums
CI 3.1.1 Session not kept - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: CI 3.1.1 Session not kept (/showthread.php?tid=66473)



CI 3.1.1 Session not kept - luis.nesi - 10-25-2016

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


RE: CI 3.1.1 Session not kept - SomeGuy - 10-25-2016

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


RE: CI 3.1.1 Session not kept - Narf - 10-27-2016

Please test if these fix it:

https://github.com/bcit-ci/CodeIgniter/commit/2f760877c313871e5066b93b0b1aa76428c09fb6
https://github.com/bcit-ci/CodeIgniter/commit/dbc025b6c2c9b0b085bb79dc126bc58fb2a8c2a8

(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


RE: CI 3.1.1 Session not kept - SomeGuy - 10-27-2016

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

https://github.com/bcit-ci/CodeIgniter/commit/2f760877c313871e5066b93b0b1aa76428c09fb6
https://github.com/bcit-ci/CodeIgniter/commit/dbc025b6c2c9b0b085bb79dc126bc58fb2a8c2a8

(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.


RE: CI 3.1.1 Session not kept - Narf - 10-27-2016

(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.


RE: CI 3.1.1 Session not kept - SomeGuy - 10-27-2016

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