I'm having a problem with some server-side validation scripts, in a shopping cart context. I have been unable to replicate this problem reliably on my own, so most of what I "know" about it is really just deduction. I've googled a bit, and found one seemingly relevant tidbit on PHP.net, but I've not had much luck with actually fixing the problem.
What happens: Users enter step one of the checkout process, enter all their vital stats and (I'm assuming) click the "Next step" button. The server validates their stuff, but finds that the only non-blank form data in $_POST is from the submit button. The server thinks this the user has failed to give it their required fields and sends the user back to the form. Begin repeating loop.
I have the server set up to email me whenever validation fails (for any reason) and I've been getting an increasing number of these "Everything blank on step 1" emails lately. So, I started having those emails include more env information ($_SERVER, $_SESSION, etc) and the only common thread I've seen is that all users with this problem are using IE6. (Although the specific HTTP_USER_AGENT lines are not identical in every case.) I've tested with all the IE6 browsers I can get my hands on locally, but none of them are displaying this behavior.
Skimming through the comments at PHP.net (http://us3.php.net/manual/en/function.header.php) it sounded as though Cache-Control might be the solution, but I've tried that and (since I can't test locally) waited a week and I continued getting the validator-error-emails. So, I tried a more elaborate header() instruction, but after waiting, received more failure emails. Then, I thought, "If it's a page-caching problem, I'll change the form action to "http://server/step2.php?junk=".mktime() and see if that helps.
I (foolishly) thought that would fix it: but no, after a few days, I began receiving the validator emails again. That brings me here. PHP-General, you're my only hope! :)
For now, I've re-coded the validator so it sends a different response when step1 data turns up mostly blank (something like "technical difficulties, please call in your order") but I'd like to figure out what's going on and get the server/browser to cooperate. Obviously, I'm still missing something. Can anybody help with this? At this point, it's just driving me nuts. (Related question: Does anyone know why this happens and/or how to trigger it? I'd like to be able to test solutions locally before throwing them onto the server.)
Some technical details: Server is running Apache 1.3.27, PHP is 4.3.3, particular page is running on https (which complicates testing a bit, no telnetting to port 80). I can send code or whatever else, if that helps.
Thanks for your help!
-- joshua
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php