Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:10:59+00:00 2026-06-06T19:10:59+00:00

Question: I am having issues passing session variables from parent page to iFrame page

  • 0

Question:

I am having issues passing session variables from parent page to iFrame page and AJAX called PHP files in Chrome & IE. It seems to work in FF and Safari though.

Environment:

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.

Approach:

User logs into WordPress using LDAP. I grab the username from WordPress and dump it into a $_SESSION['WPUsername'] 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 $.get(). The webservice.php receives the request, then uses the $_SESSION['WPUsername'] session variable to internally query the appropriate data and return the response.

Problem:

Firefox is working fine. IE & Chrome seem to think the $_SESSION['WPUsername'] doesn’t exist when requested by webservice.php.

What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:11:00+00:00Added an answer on June 6, 2026 at 7:11 pm

    I made all of the recommended changes to my PHP configuration and website. I set the cookie path in php.ini to “/” and I used the full subdomain path (“www.domain.com/dashboard/dashboard.php”) in my iFrames. It seems to be working fine now.

    On another note, I just implemented SSO using OpenAM as the IdP and SimpleSAMLphp as the SP. No need for session cookies to manage authentication anymore and all data passed between components is now done using web services.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some interesting issues with passing in variables from within an object into
Following on from my earlier question , I am still having issues with loading
I am having the same issues as per this question: WCF not deserializing JSON
I was having a look at this question: Getting random value from a SQLite
I asked a question earlier on this same project but I'm still having issues
Sorry for the kind of noob question but having issues trying to get a
I am just getting into Sharepoint, and I have a question about having a
On the back of my previous question I am having some trouble with the
Happy easters, everyone. I am currently learning topological sort and having a question about
Having typed the question and checked the similar title questions im gonna continue as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.