|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2736 PHP crash on read socket
Submitted: 1999-11-17 11:15 UTC Modified: 2002-06-16 09:00 UTC
From: eloj at altavista dot net Assigned:
Status: Not a bug Package: Reproducible Crash
PHP Version: 3.0 Latest CVS (17/11/1999) OS: Windows'95 (v4.0.1111)
Private report: No CVE-ID: None
 [1999-11-17 11:15 UTC] eloj at altavista dot net
Version: PHP4-beta2 (binary download from
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.

 $fp=fsockopen("localhost", 80);
  fputs($fp,"GET / HTTP/1.0\n\n");

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.
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 
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. :-(


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 09:00 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Mar 06 11:01:23 2021 UTC