PHP Session Bug/Issue Update

Tagged:
Some users of this site have session issues. Specifically when being logged in, then posting a comment, they are logged out. This traces back to a PHP session bug/issue that has been giving me headaches for quite some time now. Here is the PHP bug. The TotSP server does log occassional errors as such [04-Feb-2003 08:53:42] PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is cor rect (/tmp/php_sess) in Unknown on line 0 . (And the directory does exist, perms are correct, php.ini is correct, code maintains the SID, yadda yadda yadda.) I have never personally experienced this bug on any machine, anywhere at anytime. However, some users say they can regularly recreate it. PLEASE let me know if you ever have this problem. If you are logged in to this site, then post a comment and are then mysteriously logged out, then please let me know (via a comment to this post, if you can stand being logged out again). I have made several changes to try to address this bug. The latests posts in the above bug report state to give the web server user a home directory, the same as the session data directory and I have done that. I also wanted to solicit feedback from anyone whom might have any insight, and let everyone know that I am aware of the issue and I am working on it. (Its been very puzzling, its a real issue as the PHP developers seem to be trying to deal with it also, but neither they nor I can recreate it, even though users do post that it occurs, see the linked bug report, therfore its been, uh, lets say a "challenge" to try to fix.)

Comments

Re: PHP Session Bug/Issue Update

Here goes....

Re: PHP Session Bug/Issue Update

still logs me out.

Re: PHP Session Bug/Issue Update

I will try as well. I always get logged out after every post (Mozilla on XP)

Re: PHP Session Bug/Issue Update

Still logged out

Re: PHP Session Bug/Issue Update

@!#$, sorry guys, I am going to reply to the php guys on this, and keep working on it.

Re: PHP Session Bug/Issue Update

alright sirs, help me out here. do you BOTH use XP? also does this occur on other platforms with your same user accounts? any help is greatly appreciated.

Re: PHP Session Bug/Issue Update

test with IE6 on Win2k

Re: PHP Session Bug/Issue Update

test with Mozilla on Win2K

Re: PHP Session Bug/Issue Update

test with IE 5.5 on win98

Re: PHP Session Bug/Issue Update

logged me out.

Re: PHP Session Bug/Issue Update

test with Opera 7 on Win2K

Re: PHP Session Bug/Issue Update

test logged in as jeepmutt with mozilla on win2k

Re: PHP Session Bug/Issue Update

another test, new rev of phorum

Re: PHP Session Bug/Issue Update

yet another test

Re: PHP Session Bug/Issue Update

IE6 on XP

Re: PHP Session Bug/Issue Update

Logged me out. Perhaps there is a sequence issue? Logged in from the front page, went to the story, clicked on the 'comment about this story here'

Re: PHP Session Bug/Issue Update

I have never tested this before but I can post messages without signing in after I get logged out.

Re: PHP Session Bug/Issue Update

yeah shmooze, thanks for helping but thats normal, the phorum just asks you to put in your name, it does require you to be authenticated. one thing i did start thinking about and testing after you mentioned "sequence issue" is that i never, on any platform, get logged out anywhere else on the site. i can post stories, etc, and session is maintained, but as soon as phorum does an HTTP POST< its gone. this is a phorum/php-setup issue, i am still working on it. (the "phorum" is phorum.org stuff, the rest of the site i wrote, i then integrated phorum instead of just doing it all on my own, and i gues the integration is less than perfect).

Re: PHP Session Bug/Issue Update

this is my next test.

Re: PHP Session Bug/Issue Update

this damn thing *appears* to be fixed after upgrading to php 4.3.1. NO CHANGES at all to my code or my setup, just a php upgrade (and several upgrades prior to recompiling php on the server, could have been a linked library that was upgraded on linux?).

Re: PHP Session Bug/Issue Update

FYI... I just posted from same old same old machine and am still authenticated - so it's now working for me.

Re: PHP Session Bug/Issue Update

****... Never mind.... logged me out on that post....

Re: PHP Session Bug/Issue Update

to further complicate matters: I just opened up a new tab in my Mozilla browser, went to the site and it loaded showing me authenticated (although my original tab - still open - does not)

Re: PHP Session Bug/Issue Update

yeah thats actually expected, your session is still valid and you still have a cookie, its just the phorum that is breaking things. i think the previous issue is fixed, but now there is another related issue. the machine logs now occassionally complain about invalid characters in session ID?????? WTF!?! man maybe I need to switch back to Microsoft? (I dont create the session ids, they are automatic). I will keep looking into this, very strange that it still doesnt work for you, unless you are seeing the anamolous stuff mentioned above and not the previous issue.

Re: PHP Session Bug/Issue Update

shmooze if you could test a few more times at various points and just document here that would help greatly. it is my suspicion, and hope, that it will work for you *most* of the time (work meaning not log you out) and that maybe the session ids are messed up less often? thanks.

Re: PHP Session Bug/Issue Update

test from IE

Re: PHP Session Bug/Issue Update

still logged in, appears fixed, no errors in log either.

Re: PHP Session Bug/Issue Update

BTW this is working for jeepmutt as of today, he tested for me and replied that all was now working, not logged out.

Re: PHP Session Bug/Issue Update

Well I may have found an easier way for me to test this problem. I lose authentication from any http://www.screaming-penguin.com/phorum/read.php and clicking on the link "Any comments on that fine TotSP story post:". I Lose authentication every time with Mozilla, but I can go back to my previous page and get a page authenticated. I first noticed this on IE, but now cannot duplicate it there.

Re: PHP Session Bug/Issue Update

thanks for the info, i will look into these scenarios

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.