Note that there are some explanatory texts on larger screens.

plurals
  1. POLosing PHP sessions in iFrame with Chrome & IE
    primarykey
    data
    text
    <p><strong>Question:</strong> </p> <p>I am having issues passing session variables from parent page to iFrame page and AJAX called PHP files in Chrome &amp; IE. It seems to work in FF and Safari though.</p> <p><strong>Environment:</strong></p> <p>I have Wordpress as my "Portal". One of my Wordpress pages is a "Dashboard". That Dashboard makes AJAX requests against a CRM web service to render JSON data. Wordpress, the Dashboard file and the CRM are all on the same domain. "www.domain.com/wordpress" is the Wordpress domain, "www.domain.com/dashboard/dashboard.php" is the Dashboard file which is included via iFrame on a Wordpress page, and "www.domain.com/CRM/webservice.php" is the web service file I'm making AJAX calls against.</p> <p><strong>Approach:</strong></p> <p>User logs into Wordpress using LDAP. I grab the username from Wordpress and dump it into a <code>$_SESSION['WPUsername']</code> variable as an extension to Wordpress' login function. Then, when my Dashboard loads in the iFrame, it makes a request to my CRM web service file via jQuery <code>$.get()</code>. The <code>webservice.php</code> receives the request, then uses the <code>$_SESSION['WPUsername']</code> session variable to internally query the appropriate data and return the response.</p> <p><strong>Problem:</strong> </p> <p>Firefox is working fine. IE &amp; Chrome seem to think the <code>$_SESSION['WPUsername']</code> doesn't exist when requested by <code>webservice.php</code>.</p> <p>What am I missing?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload