PHP 4.0 Bug #8208 Updated: Weird behaviour
| From: | stas@php.net | Date: | Tue, 12 Dec 2000 17:16:05 +0000 |
| Subject: | PHP 4.0 Bug #8208 Updated: Weird behaviour | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41029@lists.php.net to get a copy of this message | ||
ID: 8208
Updated by: stas
Reported By: colin@easydns.com
Old-Status: Open
Status: Closed
Bug Type: Sockets related
Assigned To:
Comments:
Should be fixed in CVS (except for "a", which is normal). If
not, please reopen.
Previous Comments:
---------------------------------------------------------------------------
[2000-12-12 10:33:39] colin@easydns.com
I tried the server code listed at http://www.php.net/manual/ref.sockets.php.
Everything seems to work except:
a) it spits back extra (whitespace) characters. For instance, I connect and type "hi". I
get back:
PHP: You said "hi"
PHP: You said ""
This always happens, until I get stuck in a loop as above.
b) it spits back part of the code. For instance, I changed the script to
$talkback = "PHP: You said '" . urlencode($buf) . "'.n";
I then get output like:
PHP: You said
'foo%0D+%28true%29%3B%0A++++close+%28%24msgsock%29%3B%0A%7D+while+%28true%29%3B%0A%0Aclose+%28%24sock%29%3B%0A%3F%3E'.
PHP: You said ''.
This only happens on the first line of input. On the server side, I actually get the tail end of
the PHP script output.
c) occasionally it gets stuck in a loop. For instance, I connect and type "foo". I get
back:
PHP: You said "f"
PHP: You said "oo"
PHP: You said "oo"
PHP: You said "oo"
...etc.
This only seems to happen when I do the urlencode() testing above, and not until the 3rd or 4th line
of input.
My knowledge is pretty limited, but might this be some kind of buffer overrun?
- Colin
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8208