|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39135 fpassthru with optional argument length
Submitted: 2006-10-12 13:10 UTC Modified: 2020-04-17 10:12 UTC
Avg. Score:4.6 ± 0.5
Reproduced:9 of 9 (100.0%)
Same Version:1 (11.1%)
Same OS:5 (55.6%)
From: third-chance at gmx dot de Assigned:
Status: Suspended Package: *General Issues
PHP Version: 5.1.6 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
41 + 20 = ?
Subscribe to this entry?

 [2006-10-12 13:10 UTC] third-chance at gmx dot de
To allow resuming http-downloads a php-script must be able to deliver a specific range from a file. Although you can use fseek to start from a specific offset, their is no way of telling fpassthru to stop before the eof.
I would like to see an optional argument 'length', which stops after sending n bytes. This would be similar to the argument of the fwrite function.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-13 08:42 UTC] charlie07 at gmx dot net
Since installing the PECL HTTP extension is not always possible (especially on shared hosts), i fully support this request. Supporting partial downloads is otherwise impossible.
 [2020-04-17 10:12 UTC]
-Status: Open +Status: Suspended -Package: Feature/Change Request +Package: *General Issues
 [2020-04-17 10:12 UTC]
This feature can easily be implemented in userland, so it's
introduction into PHP core would require discussion for which this
bugtracker is not suitable.  Instead please send mail to the
internals mailing list[1].  For the time being, I'm suspending
this ticket.

[1] <>
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 22:03:38 2021 UTC