|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-22 04:53 UTC] wez@php.net
[2003-02-12 19:26 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 21:00:01 2025 UTC |
When calling fpassthru() on a file pointer opened with popen(), it fails if there has been already read from that pointer. $fp = popen("/bin/ls /", "r"); if ($fp) { $line = fgets($fp, 1024); print $line; fpassthru($fp); } Results in the following error: fpassthru(): 77 bytes of buffered data lost during conversion to FILE*! The same script works fine with php 4.2.3. It also works fine if there hasn't been read from the file before (i.e. omitting the fgets() line in above example).