Welcome Guest, Not a member yet? Register   Sign In
multiple session cookies with session library
#21

[eluser]weboap[/eluser]
@WanWizard that's what i always thought. till i had to spend a whole day troubleshooting 4 session records created every time the page refresh. i didn't mention here that im using the HMVC extension with modified loader for sparks. that was my config. as soon as i dropped the autoload instance of the session lib. everything went to normal.
#22

[eluser]WanWizard[/eluser]
Ah, the 'hacks for stuff that should be in the core' extensions...
#23

[eluser]skunkbad[/eluser]
[quote author="WanWizard" date="1350504124"]Ah, the 'hacks for stuff that should be in the core' extensions...[/quote]

Did you fix the problem?
#24

[eluser]WanWizard[/eluser]
What problem?

The session issue or the fact that the CI core lacks features I find essential in a modern framework? Wink
#25

[eluser]skunkbad[/eluser]
[quote author="WanWizard" date="1350566751"]What problem?

The session issue or the fact that the CI core lacks features I find essential in a modern framework? Wink[/quote]

The session issue.
#26

[eluser]WanWizard[/eluser]
Haven't looked into it any further, other then that my assumption about cookie deletion due to the length was not correct.

IE and FF happily accept very long header lines, Chrome aborts with a 503 error when that happens. None of them cause the session to be reset.

I don't build CI applications anymore, so no real incentive to spend more time looking into it at the moment.
#27

[eluser]skunkbad[/eluser]
[quote author="WanWizard" date="1350574225"]I don't build CI applications anymore, so no real incentive to spend more time looking into it at the moment.[/quote]

I know you mentioned your struggling with a PyroCMS application, so I was wondering if my proposed code might fix that. All it does is remove all but the last set-cookie from the response header. One side effect is that since setcookie() is indirectly called manually through a post controller hook, instances where I was echoing out some json in controllers that output ajax responses had to be changed to use Output->set_output() instead of echo. Obviously it's not possible to send a header after output is sent to the browser.

If the issue is just that browser X is too stupid to pick the last set-cookie in the header, then assuming the last one is the right one, my code would give the browser only a single choice. In my testing everything seemed to work fine, but I never had any issues with sessions, so I'm not sure if I fixed the issue or not.
#28

[eluser]WanWizard[/eluser]
Ah, ok. Haven't tried that, I'll do that when I find a spare moment.

I even have the issue with a Pyro install that runs locally. Spend half an hour writing a new page, press save, and you're presented with a login screen. 30 minutes wasted. From pure misery I now copy the content I have written before a save, just in case. Very annoying....




Theme © iAndrew 2016 - Forum software by © MyBB