php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22205 some strange chars when using sockets
Submitted: 2003-02-13 07:30 UTC Modified: 2003-02-13 07:55 UTC
From: marrtins at hackers dot lv Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.0 OS: w2k
Private report: No CVE-ID: None
 [2003-02-13 07:30 UTC] marrtins at hackers dot lv
sometimes i'm getting strange symbols in recieved stream when using $data .= fgets($socket, $buff_len) or the same with

while($peace = @socket_read($socket, $buff_len, PHP_BINARY_READ))
  $data .= $peace;

somewhere in the stream i get string "\r\n1ffc\r\n" why? there is no such string in resource. and not always the stream contains these chars.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-13 07:34 UTC] wez@php.net
You just discovered HTTP/1.1 chunked transfer encoding.
Change your scripts to request data using HTTP/1.0.
Not a bug in php -> bogus.
 [2003-02-13 07:55 UTC] marrtins at hackers dot lv
tried some tests with HTTP/1.0, at least now it seems to work ok
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 30 19:00:02 2025 UTC