#23658 [Fbk->Bgs]: still problem with fwrite() , fputs()

From: Date: Thu, 22 May 2003 21:40:01 +0000
Subject: #23658 [Fbk->Bgs]: still problem with fwrite() , fputs()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40217@lists.php.net to get a copy of this message
 ID:               23658
 Updated by:       sniper@php.net
 Reported By:      c dot ferrari at gmx dot net
-Status:           Feedback
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Windows XP
 PHP Version:      4.3.2RC3
 New Comment:

Can not reproduce either.



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

[2003-05-16 14:25:01] pollita@php.net

*not* confirmed on Win2K/4.3.2RC3.

The above example works exactly as expected.

type log.txt

Outputs:

11111
22222
33333
44444
55555
66666
77777
88888
99999
91111


*



Is it possible some of your \n characters are typoed as \r ?

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

[2003-05-16 10:31:27] wez@php.net

How are you producing that output?

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

[2003-05-16 09:46:27] sniper@php.net

Works fine within linux, so it's just some win32 problem.


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

[2003-05-16 05:01:42] c dot ferrari at gmx dot net

This is a sirious problem!
Since Version 4.3.1 an above fputs() does not work as expectet.
Try out the example above.

Example:
<?php
$text="";
$text .= "11111"."\n";
$text .= "22222"."\n";
$text .= "33333"."\n";
$text .= "44444"."\n";
$text .= "55555"."\n";
$text .= "66666"."\n";
$text .= "77777"."\n";
$text .= "88888"."\n";
$text .= "99999"."\n";
$text .= "91111"."\n";

	$fp=fopen("./log.txt","w+");
 	fputs($fp,$text."\n");
 	fputs($fp,"\n*");
 	fclose($fp);
?>

My output looks like this:

11111
22222
33333
44444
55555
66666
77777
88888
99999
*1111

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


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


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



Thread (6 messages)

« previous php.bugs (#40217) next »