Edit report at http://bugs.php.net/bug.php?id=53006&edit=1

 ID:                 53006
 Updated by:         cataphr...@php.net
 Reported by:        poulpillusion at free dot fr
 Summary:            stream_get_contents offset max is 1165
 Status:             Closed
 Type:               Bug
 Package:            Streams related
 Operating System:   Linux Aptosid
 PHP Version:        5.3.3
 Assigned To:        cataphract
 Block user comment: N

 New Comment:

That may or may not have helped (probably not, but I'm not sure, since I
couldn't reproduce the blocking).



What fixed it for me was this one:
http://svn.php.net/viewvc/?view=revision&revision=304384



Thank you for helping making PHP better.


Previous Comments:
------------------------------------------------------------------------
[2010-10-15 01:11:04] poulpillusion at free dot fr

You fixed it !



I assume this is your fix :
http://svn.php.net/viewvc/php/php-src/trunk/main/streams/streams.c?r1=303414&r2=304354



Even if you did all the work, I feel a little proud.



Thank you very much, cataphract.

------------------------------------------------------------------------
[2010-10-14 05:19:59] cataphr...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------
[2010-10-14 05:15:19] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=304384
Log: - [DOC] Reverted rev #304382 and rev #304380, as I figured out a
way to
  fix the erratic behavior without breaking backwards compatibility.
Namely,
  $offset retains SEEK_SET behavior but actually SEEK_CUR is passed to
  _php_stream_seek, if possible, by moving the offset
stream->position bytes.
- Addresses bug #53006.

------------------------------------------------------------------------
[2010-10-14 04:03:20] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=304380
Log: - [DOC] Changed stream_get_contents() so that the offset is
relative to the
  current position (seek with SEEK_CUR, not SEEK_SET). Only positive
values are
  allowed. This breaking change is necessary to fix the erratic behavior
in
  streams without a seek handlder. Addresses bug #53006.
#Note that the example on the doc page for stream_get_contents() may
fail
#without this change.
#This change is also in the spirit of stream_get_contents(), whose
description
#is "Reads all remaining bytes (or up to maxlen bytes) from a
stream...".
#Previous behavior allowed setting the file pointer to positions before
the
#current one, so they wouldn't be "remaining bytes". The
previous behavior was
#also inconsistent in that it allowed an moving to offset 1, 2, ..., but
not 0.

------------------------------------------------------------------------
[2010-10-13 23:59:37] poulpillusion at free dot fr

Ok so... is there anything else I can do to help you fix this bug ? I
mean : more testing, more feedback ?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=53006


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53006&edit=1

Reply via email to