(04-14-2015, 07:15 AM)RWCH Wrote: Just a guess:
session_start() starts a new session or resumes an existing session". By doing another page request without calling session_start you will loose you session. You MUST call session_start() to resume your session. Why do you call session_start()?
In CodeIgniter it is sufficient to use $this->load->library('session'); You session will be available with every page request and you can access it using $this->session.
I think var_dump($_SESSION); and var_dump($this->session); will give you the same result. However I never checked it and cannot check it now.
I have call session_start() in my external script:
PHP Code:
<?php
if(!isset($_SESSION)){
session_start();
}
var_dump($_SESSION);
Yes var_dump($_SESSION) and var_dump($this->session->all_userdata()) will give the same result, but it has nothing to do with my problem.
My problem is:
$_SESSION in my non-codeigniter php application is different from $_SESSION in codeigniter application.
Thus Codeigniter and non-codeigniter php application cannot share session.