Welcome Guest, Not a member yet? Register   Sign In
Did I just lose my session? Nope, DB setup problem
#1

[eluser]MadZad[/eluser]
This is a description of a bug we encountered and the solution. Hopefully this will save someone some debugging time...

What we saw
App allows user to specify a data file (and params) for input. Next screen shows a preview of the data, so it was uploaded fine. When the user clicked the "go" button to do the actual processing and saving, they got a "session expired" message. The fact that they were logged in had somehow been lost.

Our setup
The CI app stores session info in the DB (using OBSession). When the datafile was loaded into a data structure, that structure was then stored in the session. This meant there were a few possible sources of the error.

What the problem was
The column in our MySQL table for storing the session data had a type of "text". That was simply not big enough, so session data (including login credentials) was corrupted. Changing that column to "mediumtext" was all that was required to fix the bug. "Largetext" would have been excessive for us.

Also worth checking, if you see such behavior, is the PHP post_max_size, which can be checked via phpinfo().

Lastly, a tribute to a great toon, just 'cause: xkcd.com/217/ :-)




Theme © iAndrew 2016 - Forum software by © MyBB