MyDBR in iFrame gives cookie error

(2 posts) (2 voices)

Tags:

No tags yet.

  1. gbrown100, Member

    When I try to run MyDBR in an iFrame I get a cookie error as below upon completed login:

    Problem with configuration.
    Cause: Cookies cannot be accessed
    Suggestion: Check that your cookies are enabled and that the server session path is valid

    Script: /index.php
    Session path: /

    For additional server debug information please set $mydbr_defaults['debug_cookie'] = true; in user/defaults.php

    Anyone know what I can do to get it running? I found this site: http://adamyoung.net/IE-Blocking-iFrame-Cookies

    Excerpt below:

    IE Blocking iFrame Cookies
    Cookies IE iFrame P3P Compact Policy
    I got a call today about one of my applications not running correctly from inside an iFrame. I tried it out and it looked like everything worked great in Safari and Firefox but not IE6 or IE7. It took me a few failed attempts to fix it before I decided it must be a session problem. After firing up a packet sniffer it became obvious the cookie with the session ID was not being passed.

    The problem lies with a W3C standard called Platform for Privacy Preferences or P3P for short. You can read all about the boring stuff via the link or else just install the P3P Compact Policy header below. This will allow Internet Explorer to accept your third-party cookie. You will need to send the header on every page that sets a cookie.

    PHP:

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

    ASP.NET:

    HttpContext.Current.Response.AddHeader("p3p","CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");

    Django:

    response = render_to_response('mytemplate.html')
    response["P3P"] = 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND
    CNT"'

    JSP:

    response.addHeader("P3P","CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"")

  2. myDBR Team, Key Master

    Hi,
    There are couple of options how to handle this.

    In client's Internet Explorer: You can add your site list of sited which you allow to use cookies. IE's Tools->Internet options->Privacy->Sites-> allow. Alternatively you can set the privacy setting to Medium where the third party cookie from myDBR is accepted.

    In your web server: You can also add the P3P Privacy Header to your web server config (htaccess or IIS's HTTP Headers).

    --
    myDBR Team


Reply

You must log in to post.