Welcome Guest, Not a member yet? Register   Sign In
POST destroys or resets session
#1

[eluser]easymind[/eluser]
I don't know if it is an apache bug or not but when I am posting data my sessions seems to be destroyed. I am posting 3 lists of some 40 items, as arrays

(<input type="text" name="name[]"/&gtWink

It seems to only happen when the list is large and some values are empty. Otherwise it all works fine. Anybody knows about this issue?
#2

[eluser]Dam1an[/eluser]
The session data is encrypted and has a 4k maximum
Try changing your settings in config to use the database, then you don't have these limits
See the userguide for more info
#3

[eluser]easymind[/eluser]
I am using database and have set encryption on false. I also don't put my post data in the session, so the 4kb limit is no problem. My session only holds $loggedin as a specific variable.

I think it is an apache thing, something with long post arrays..

RTFM is not working form me Wink
#4

[eluser]drewbee[/eluser]
If you are using database sessions, what is the data type of the userdata column?


edit: Sorry, I am off key today.... just seen you were not putting post data in the session.
#5

[eluser]easymind[/eluser]
I just copied all my code to another server and there there are no problems. I have checked the php setting that may be of influence: register_long_arrays, but on both servers it is on.

Craziness....

I think it is something with long post arrays that somehow removes the cookie data in the post or something, so no session id is known...
#6

[eluser]easymind[/eluser]
Ok, so, there can be a limit to the amount of variables one can post in one run in some php configs. If suhosin is enbaled it is set by default to:

[suhosin]
suhosin.post.max_vars = 200
suhosin.request.max_vars = 200

This was the case on my host. So I have rewritten the code to use ajax to only save 1 question at a time instead of the whole list in one go.

Looking into session posting and into uri protocol took me all day, and now it seems it was just the tight ass hosting comp. Who has ever heard of suhosin anyways? Sounds like something you eat with sticks...
#7

[eluser]wiredesignz[/eluser]
http://www.hardened-php.net/suhosin/

Plus I wanted to know also.




Theme © iAndrew 2016 - Forum software by © MyBB