|
Posted by matt VanDeWalle on 10/03/05 06:34
hello again
I was writing and rewriting my user function for my chat server trying to
crush this bug but its beyond me whats going on. basically I have it so
if a new user comes on, we know that if they type "new" at the prompt so
it goes to the newuser function, asks for a username, accepts that
alright, but when I ask for a password(echoed or not), even if i ask for
anything else, just the second input of the function, it skips right
threw that, prompts for it but apparently the buffer still has a \n in it
so it is assuming that is the password and going right onto the 3rd signup
prompt, i could stick with the default password being a random number and
avoiding this whole problem, but i actually don't, the buffer is still
full of whatever, and would ask the 3rd prompt but just drop right threw,
I turned on implicit_flush in php.ini, just as a second measure, I call
ob_implicit_flush() after reading from the socket each time, but the '\n'
or whatever mysterious character, still seems to be there, also, I know
too because before i started working on redoing the logon function, i
would log on and i would automatically have a character sent but i didn't
type anything so something is really screwy or am I just not clearing the
buffers the right way?
oh yes, as you may have assumed from what I wrote, or may not have, after
the password or otherwise 2nd prompt, things work as expected with the
other prompts,
if this helps, I am using php 4.3.10 in command line interface
[Back to original message]
|