CodeIgniter Forums
p3p policy - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: p3p policy (/thread-21931.html)



p3p policy - El Forum - 08-25-2009

[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


p3p policy - El Forum - 08-25-2009

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


p3p policy - El Forum - 08-25-2009

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


p3p policy - El Forum - 06-26-2012

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


p3p policy - El Forum - 06-28-2012

[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 ?!