I apologize, Steve. Allow me to format my question a little better.
Hello LimeSurvey community! I'm experiencing something odd, and after reading the documentation, and digging into the source, I still can't really figure out what's going on.
I'm attempting to do the following: a client wants to quickly duplicate a "master" survey. Upon duplication of all the survey tables, my scripts accept posted names/e-mail addresses, creates the necessary lime_token_xxxxxx table. Then upon activation, creates the lime_survey_xxxxxx tables, sends the e-mails and activates the survey.
All this works great. Everything is being duplicated properly, and e-mails go out. Where I am seeing strange behavior is when the link to the survey is clicked. Users get the Session timeout error, but when the page is refreshed, the error is gone and the survey can be taken as normal. When submitted, everything happens as it should and e-mails go to the admins, etc.
However, if I use my scripts to do everything EXCEPT activate the survey (thus creating the lime_survey_xxxxxx table and sending the emails), and instead use the admin page to activate the survey and send the token e-mails, I don't get the Session Expired error. This is happening before the survey is even started, so it's not timing out in the middle, but before it even begins! I can't tell what Limesurvey is doing when it activates a survey and sends the token emails, but there is something going on. A server variable? A record being written to the database? I can't find anything. Help!! Thank you in advance!!
Hopefully this more readable version will get me some answers!