ID:               22682
 Comment by:       alexey at ozerov dot de
 Reported By:      fbeyer at clickhand dot de
 Status:           No Feedback
 Bug Type:         Filesystem function related
 Operating System: Windows XP
 PHP Version:      4CVS-2003-04-28 (stable)
 New Comment:

I still have a related bug on Windows XP using PHP 4.3.4. Sample:

<?
header("Content-type: text/plain");
ini_set("auto_detect_line_endings", true); // Doesn't matter
$file=fopen(__FILE__,"rt");                // "t" doesn't matter too

$linenumber=0;

while ($file && $line=fgets($file, 65536))
{ echo ("$linenumber: ".$line."\n");
  fseek($file, ftell($file), SEEK_SET);
  $linenumber++;
}
fclose($file);
?>

fseek() should not do anything but it _shifts_ the file pointer (as
many bytes back as many "\r" are in the last read input) if I the
__FILE__ has DOS encoded line breaks. As the result every line is
followed by a blank line in the sample output.


Previous Comments:
------------------------------------------------------------------------

[2003-08-17 18:34:15] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



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

[2003-08-12 19:41:45] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-05-11 08:28:04] [EMAIL PROTECTED]

As Wez pointed out above, this is a generic __setmode() issue.
status: open => verified


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

[2003-04-28 12:31:38] [EMAIL PROTECTED]

Related to Bug #22497

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

[2003-04-28 09:18:51] fbeyer at clickhand dot de

No, unfortunately, the result is the same.

But I've found out that the problem only occurs if PHP is run as an
apache module (I'm currently using 1.3.20). The CGI executable works as
expected - this is why I mentioned that the bug doesn't occur in the
PHP5 snapshot since I've installed it using CGI.

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

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/22682

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

Reply via email to