Bug #2736: PHP crash on read socket
| From: | eloj at altavista dot net | Date: | Wed, 17 Nov 1999 10:15:49 +0000 |
| Subject: | Bug #2736: PHP crash on read socket | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12647@lists.php.net to get a copy of this message | ||
From: eloj@altavista.net
Operating system: Windows\'95 (v4.0.1111)
PHP version: 3.0 Latest CVS (17/11/1999)
PHP Bug Type: Reproduceable crash
Bug description: PHP crash on read socket
Version: PHP4-beta2 (binary download from www.php.net)
Modules: MySQL
Info: Reporting the same bug as in #2519
Desc: Any try to _read_ from a socket will cause the crash, though writing is - it appears - okay.
In the following code rem'ing out the fgets() removes the crash. fgetc() and fread() crashes
also.
<code><pre>
$fp=fsockopen("localhost", 80);
if($fp){
fputs($fp,"GET / HTTP/1.0\n\n");
$dummy=fgets($fp,128);
fclose($fp);
}
</pre></code>
I wish I could give a call traceback, but since this is Windows, this will have to do:
PHP caused an invalid pagefault in
module <unknown> at address 0000:00000003.
Register:
EAX=0076135c CS=0137 EIP=00000003 EFLGS=00010213
EBX=0063fb60 SS=013f ESP=0063fb24 EBP=00000001
ECX=14fb6300 DS=013f ESI=0076135c FS=109f
EDX=0063fb60 ES=013f EDI=00000004 GS=0000
Byte at CS:EIP:
00 65 04 70 00 16 00 b4 08 65 04 70 00 65 04 70
Stackdump:
10032741 0063fb60 00000004 00775981 00000014 00000001 00000000 10013893 0076135c 0063fb60 00000004
0063fb58 00000004 00000000 10013dec 00000014
I'm using a normal non-beta WinSock2 from Microsoft, version 4.10.1656 (QFE)
If you need more info, don't hesitate to contact me (I might be able to aid in debugging if you
cannot reproduce this). This is a real showstopper. :-(