Re: Re: Multiple Session Buffers
| From: | Al | Date: | Wed, 18 Jul 2007 17:53:50 +0000 |
| Subject: | Re: Re: Multiple Session Buffers | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-259135@lists.php.net to get a copy of this message | ||
The existing page had an include(file), before my CAPTCHA code, which included a session_destroy(). Thus, when the user refreshed the page with a Submit, it called the include(file) which destroyed the data I was trying to save in the session handler, from the previous page rendering.
Anyhow, the problem is solved. I put the include file, with the session_destroy() after I accepted the user's keyed in CAPTCHA code. Thus, it couldn't destroy my CAPTCHA data.
I think of the session handler as a "buffer".
Richard Lynch wrote:
On Sat, July 14, 2007 1:26 pm, Al wrote:You guys confirmed my understanding, it can't be done in a reasonable manner. I'm adding a simple CAPTCHA to an existing page and don't want to bother tracing the code that modifies the session buffer. It's obvious that the code is resetting the buffer, so it messes up my saving of the security number. Obviously, I don't want it exposed with GET or shown in the HTML source. I'll just make my own simple session-like buffer with a tmpfile() outside the webspace.I suspect you have a flaw in your basic HTTP interaction logic rather than whatever it is you think is going wrong... I'm not sure what you mean by "session buffer" either... A lot of error_log() statements to see where you are storing/retrieving your security number will probably help you far more than trying to re-invent sessions...