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

[eluser]Unknown[/eluser]
Dear All,

I tried to store captcha word that i create in session using

Code:
$this->session->set_userdata(array(  
    'captcha_word' => $cap['word'],
    'captcha_time' => $cap['time']
  ));
And then, I'll retrieve using

Code:
$word = $this->session->userdata('captcha_word');
to be compared with user input for captcha.

for debugging purpose , after storing in session i print using
print_r($this->session->userdata);
and got value
Quote:Array ( [session_id] => 22665cec01f065cc6e40a0d890051ca8 [ip_address] => 127.0.0.1 [user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22 [last_activity] => 1364354023 [user_data] => [captcha_word] => OddwxM....

But the problem is, when I retrieve the session data later, I found out that the value of captcha_word is
Quote:Array ( [session_id] => 22665cec01f065cc6e40a0d890051ca8 [ip_address] => 127.0.0.1 [user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22 [last_activity] => 1364354023 [user_data] => [captcha_word] => HnnOk ....

the session_id match, but the captcha_word is not the same with the value that i store previously.
Between store and retrieve, there is no process that affect the value of captcha_word in session.

I wonder what cause the problem and help will be appreciated.

regards,
ganda


Messages In This Thread
Session not consistent - by El Forum - 03-26-2013, 08:52 PM
Session not consistent - by El Forum - 03-27-2013, 04:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB