Jump to content

vriezerweb

New Members
  • Posts

    3
  • Joined

  • Last visited

vriezerweb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The thing is, it's not a stdClass instance, it's an instance of the Answer class. Jacques1, of course I don't expect anyone to fix the problem for me, only thing I ask is if anyone has a slight clue what might cause this.. and if anyone has had issues before with session vars getting lost. Seems I'm not quite the only one having these problems: https://www.google.nl/search?num=100&espv=2&q=php+session+sometimes+lost&oq=php+session+sometimes+lost
  2. Jaqes1, I totally agree with the things you are pointing out, but it's old software and I have to deal with it. But.. that doesn't explain the symptoms. Of course we can rewrite the entire piece of software in a more decent style, but that's economically impossible (quite a large application). So I am focussing on trying to get it 100% of the times working again instead of 99% of the times.
  3. [ ENGLISH ] I have a very strange problem, and I think (not 100% sure) it started to occur when we upgraded the PHP and apache version of our server. Case is, we have a web application, in which the user fills in a paged questionnaire. After each 'Next' button is hit, the answers are stored in $_SESSION['answersessions'][<quesstionaireId>]. When the last page is shown and the user clicks 'Finish', the answers from session are stored in the database. This almost always works correctly, but sometimes (very hard to reproduce) the following happens: The user gets these messages: Warning: Creating default object from empty value This happens on the line: $_SESSION['answersessions'][$_POST['questionnaireId']]->createDate = new DateTime; followed by Fatal error: Call to undefined method stdClass:Save() Which happens on this line: $_SESSION['answersessions'][$_POST['questionnaireId']]->Save(); In both cases, obviously $_SESSION['answersessions'][$_POST['questionnaireId']] is not set anymore. But the session itself is not lost, the user is still logged in. Does anyone have a slight clue what's going on? I have already made sure the user cannot doubleclick the submitbutton by adding a jQuery click handler like: $("#questionform").on("submit", function(){ if ($("#questionform").valid()) $('#nextbutton').hide(); }); Some settings form phpinfo(): session.cache_expire: 180 session.gc_maxlifetime: 1440 session.cookie_lifetime: 0
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.