ID: 21815 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Assigned Bug Type: Filesystem function related Operating System: Linux 2.4 PHP Version: 4.3.0 -Assigned To: +Assigned To: wez New Comment:
I know what the problem is -> assigning to myself Previous Comments: ------------------------------------------------------------------------ [2003-01-22 04:01:43] [EMAIL PROTECTED] 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). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21815&edit=1