Welcome, Guest
Username: Password: Remember me

TOPIC: Mechanical Turk, IFRAME, sessions, and Limesurvey

Mechanical Turk, IFRAME, sessions, and Limesurvey 3 years 6 months ago #55346

  • alansz
  • alansz's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
I'd like to use a limesurvey 1.85+ survey as an external question in Amazon Mechanical Turk (AMT). AMT presents my survey in an iframe, and I see the welcome page of the survey.

When I click the first "Next" button in the iframe limesurvey welcome page to begin the survey, I get the "session has expired" message. The survey works fine outside of the iframe. The survey is open, and not using tokens.

Can anyone advise me on how to try to get it working? Searching around the forums and bug trackers, I learned about an issue in 1.80, but the recommended fix (a P3P header) was incorporated and is in 1.85+. Based on general searches about php and sessions, I have tried adding iframe=src to php.ini's url_rewriter directive, and I've tried using ini_set in limesurvey's common.php to set session.use_cookies to 0, neither of which seemed to work.

In a pinch, I supposed I could use a "shim" web page in the iframe that would then load the survey into a new browser window (outside of the iframe), but if it can be done in the frame, I'd like to know how.

Thanks in advance!
The administrator has disabled public write access.

Re: Mechanical Turk, IFRAME, sessions, and Limesurvey 3 years 6 months ago #55355

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
I remember having worked for Harvard ot the MIT (Massachusetts Institute of Technology) a few months ago at an mechanical turk experiment. I'll try to get in touch with these guys, asking if they can give a helping hand.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: alansz

Re: Mechanical Turk, IFRAME, sessions, and Limesurvey 3 years 5 months ago #55750

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
Here comes the answer I received:
"In any case, all I'm able to share on the matter is that the
Limesurvey (PHP?) session mechanism is quite picky. I was using a
domain name instead of the IP address in the link, but when the URL
got rewritten (by Apache mod_rewrite, I guess, but I didn't set that
up) to the IP address, the session was "expired". Setting up the URLs
as IP addresses fixed the problem. This was not the same mechanism
either, it doesn't use frames, but rather a redirect. I don't
understand the details of how it was set up, yet.

Apologies that this isn't a clear answer. All I can say with any
certainty is that the error may indicate a session caching problem."

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Mechanical Turk, IFRAME, sessions, and Limesurvey 3 years 5 months ago #55862

  • alansz
  • alansz's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Thanks. I suspect that's right. I think the mod_rewrite stuff in .htaccess may have also been implicated here.

I upgraded to 1.90+, and I've switched to using a cgi shim to collect the parameters and then call through to limesurvey using passthru and directly calling to /index.php?sid=... instead of the pretty url, and it's working very well.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.142 seconds
Donation Image