Welcome Guest, Not a member yet? Register   Sign In
Flashdata disappears when certain ASCII codes appear in message
#2

[eluser]Simple Gifts[/eluser]
After a little more digging, this appears to be a cookies problem.

The following code
Code:
setcookie('myQuoteTest',     ' "Hello World" ');
setcookie('myQuoteTestFail', ' “Hello World” ');
print_r($_COOKIE);

produces the following:
Code:
Array
(
    [myQuoteTest] =>  "Hello World"
    [myQuoteTestFail] =>  Hello World
    ...
)

The double quotes get stripped from the failing cookie. The CI session cookie gets confused because the flashdata component of the session variable is two characters shorter than expected.

Here's the CI session cookie for the failing flashdata:
Code:
[lnp_ci_session] => a:7:{
            s:10:"session_id";
            s:32:"9bf1eacee64a35e8f3f3eaa3abf210c9";
            s:10:"ip_address";
            s:9:"127.0.0.1";
            s:10:"user_agent";
            s:99:"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4";
            s:13:"last_activity";
            i:1351286819;
            s:9:"user_data";
            s:0:"";
            s:15:"flash:old:error";
            s:15:" "Hello World" ";
            s:15:"flash:new:error";
            s:15:" Hello World ";   // note that the embedded double quotes are missing
                                    // and the string is only 13 characters long
            }56f72386e3e36b0ce9805c245db1895c

Note sure where to take this next, since it seems to be a php situation. Any thoughts?




Messages In This Thread
Flashdata disappears when certain ASCII codes appear in message - by El Forum - 10-26-2012, 03:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB