[FX.php List] Weird session variable issue

Leo R. Lundgren leo at finalresort.org
Thu Dec 19 10:03:52 MST 2013


19 dec 2013 kl. 17.57 skrev Bob Patin:

> Leo,
> 
> Thanks for the reply; 

No problem.

>> What you should do is debug the application source code so that you isolate the matter. Log the state of the session and its data at strategic points during the requests, so that you can tell exactly WHEN the data goes missing.
> 
> Well, I did that; I added a 2nd function to write to a test database after each step of the process. What is interesting is that when this error occurs, even after just the first form (there are about 4 steps to the application process), we sometimes get blank fields on the test database—which indicates to me that FileMaker is creating the record properly, but there isn’t any data in the session variables.
> 
> It’s a fairly simple process: I retrieve the form values, save them all to session variables, and then in my test function I retrieve these and write them to a test record. i do this in 4 spots in the process, to see if the data is being retained, and to see where it breaks down. It’s almost as though the session variables just aren’t being written at all...

Did you verify that the data you try to fetch from the session variables is indeed in those session variables (assuming they exist) right before you send it off to the database?

>> 1. There are practical and resource technical limits to how much data you store, but unless you have a lot of data that's hardly relevant. How much data are you storing?
> 
> not really that much, but a lot of values; these are names, address, that sort of thing; none of the session variables contain more than about 30-50 characters, I would guess.

Yeah, this should not be a problem at all.

>> 2. Again hardly relevant unless you are doing something extreme. How many variables are you storing in your session? Basically this and the former point depends mainly on the amount of memory available to PHP.
>> 3. I'm not aware of anything out of the ordinary that you cannot store. Definately not one of those.
> 
> That’s what I thought too, but thought I’d ask… 
> 
> The other strange thing is that I’m using JQuery validate() to make sure users can’t leave a form without filling it out completely, which ensures that I’m capturing all the values I need to capture.

Please note that this only ensures it on the client side; It's still possible to circumvent this and potentially cause havoc if the server side doesn't to the final validation needed to make sure that you have good and required data to work with.

> However, I’m beginning to wonder if the GET that I’m using in JQuery isn’t actually retrieving all the values.

You'll be closer to knowing this if you know for sure what exists on the server side and in the code that runs when the data seems to be missing.

> Thanks,
> 
> Bob Patin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20131219/730195a6/attachment.html


More information about the FX.php_List mailing list