Welcome Guest, Not a member yet? Register   Sign In
p3p policy
#1

[eluser]egoslip[/eluser]
Hey guys after reading around it seems that the CI session lib is not frameset(iframe) compatible for storing sessions or cookies off the bat

I tried to add the following in the controller right before the view is called
Code:
header('P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
or
Code:
header("p3p: CP=\"CAO PSA OUR\"");

even tried both but it still not working .. i have sessions autoloading

the question is... where can add that before anything is called ... globally I mean. even with sessions autoloading

so i don't have to call it in every controller or views and it add the header info before the session is called ... as i think this is my issue the session starts before the header with the p3p is called and when the session is called it starts a new sess_id instead of continuing the old one
#2

[eluser]davidbehler[/eluser]
You can either put that in your index.php or create a hook: http://ellislab.com/codeigniter/user-gui...hooks.html ... pre_controller or pre_system should be what you need.
#3

[eluser]egoslip[/eluser]
Awesome it works great i just added it to the index file thanks
#4

[eluser]adinin[/eluser]
Confirming that the longer version of egoslip's header call at the top of my main index.php file (immediately after the opening php tag) solved this cookie sessions issue in an iFrame for me as well.
#5

[eluser]Unknown[/eluser]
I use ver. 2.1.1 and I have the same issue but headers didn't work for me. In iframe I load the page and session data than at the first ajax request i can't get read session data but after one refresh everthings cool. How odd is that!

I don't use underscores in cookiename. I have proper timezone settings. I have the headers so i don't know what else should I do ?!




Theme © iAndrew 2016 - Forum software by © MyBB