From:             henrik dot gebauer at web dot de
Operating system: Windows 2000
PHP version:      4CVS-2003-03-01 (stable)
PHP Bug Type:     Filesystem function related
Bug description:  php writes on wrong position in file after new lines

New line chars seem not to count any longer.
The following example writes 6 new lines in a file, then 20 chars.
'test' should be placed after the last '9' but it is placed after the last
'3' (6 characters earlier as there are 6 new line chars)

I didn't have the problem with earlier versions of PHP.

<?php
$fp = fopen('file.txt', 'w');
fwrite($fp,"\n\n\n\n\n\n01234567890123456789");
fwrite($fp, 'test');
fclose($fp);
readfile('file.txt');
?>
-- 
Edit bug report at http://bugs.php.net/?id=22497&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22497&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22497&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22497&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22497&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22497&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22497&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22497&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22497&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22497&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22497&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22497&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22497&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22497&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22497&r=gnused

Reply via email to