0

I am developing a facebook app with symfony2. When the user comes to the app, facebook loads my symfony2 app inside the canvas frameset. On the server side i am getting some parameters, and I am saving them to the session. Everthing seems fine- except on internet explorer:

As soon as I click on another page (inside my web app), the session is refreshed: i am seeing a new session ID (which i am printing for debug purpose in the template) on each click inside my app -> all facebook data lost :(

This is already making me wonder, but its getting even more weird:

As soon as I am opening the symfony2 page in a new tab (so without facebook-frameset), and I am clicking around, the session stays persistant. When I switch back to the facebook frameset and I click around it also keeps the session I started- everything works fine from that point.

WTF? Anyone? Any idea?

stoefln
  • 14,498
  • 18
  • 79
  • 138
  • I can only give a feedback about a strange problem of session I've encountered with IE : IE drops cookies for subdomains with underscore (http://stackoverflow.com/questions/794243/internet-explorer-ignores-cookies-on-some-domains-cannot-read-or-set-cookies). – AlterPHP Jul 02 '13 at 13:17

2 Answers2

0

"The problem lies with a W3C standard called Platform for Privacy Preferences or P3P for short." See the full description here: http://adamyoung.net/IE-Blocking-iFrame-Cookies

setting following header did the job:

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

Awkward, that I did not stumble upon this before...

stoefln
  • 14,498
  • 18
  • 79
  • 138
0

I've created a gist with a quick fix for that problem in symfony2 https://gist.github.com/AlexandreKilian/11214170

AlexK
  • 471
  • 1
  • 5
  • 14
  • and here's my bundle, simply install with composer, add to the Kernel, and it should be fixed... https://github.com/Pulpmedia/P3PCookieBundle – AlexK Apr 24 '14 at 11:16