#20215 [Opn-Fbk]: fputs(); (Line Feed / Carriage Return)
ID: 20215 Updated by: [EMAIL PROTECTED] Reported By: admin at serveurperso dot com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Windows 2000 -PHP Version: 4.3.0 +PHP Version: 4.3.1-dev New Comment: What if you write the file in 'wb' (binary) mode? Does it make any difference? Previous Comments: [2003-02-11 15:57:26] 6th at katiusha dot com dot ru Funnily, the bug occurs when I run php as a module. When I run php using cgi or commandline, no excess 0D symbols appear. [2003-02-11 15:40:50] 6th at katiusha dot com dot ru PHP 4.3.0 (build Dec 27 2002) Apache 1.3.23 Win ME This: $f=fopen(bug,w); fwrite($f,test ); // 74 65 73 74 _0D 0A_ fclose($f); creates file: 74 65 73 74 _0D 0D 0A_ I'm using plain files with ms-dos line breaks to store databases, so fwrite is _very_ important for me to work correctly. [2003-02-09 10:53:25] [EMAIL PROTECTED] Similar to bug #21916 [2002-11-27 13:22:47] admin at serveurperso dot com I had foreseen what it is necessary since the beginning on: http://www.serveurperso.com/temp (fichier.txt and copy-paste from the show_source(fputs.php);) I send fputs.php script and fichier.txt sample text file to you ([EMAIL PROTECTED]) to make win you of the time. I don't arrive determined of or come these 0D0A(hex) in too much. It doubles has every writings. (I am French sorry for my english) [2002-11-27 06:09:24] [EMAIL PROTECTED] Can you provide a link that will allow me to download the .txt and .php files directly? (or zip them up and mail them to me) 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/20215 -- Edit this bug report at http://bugs.php.net/?id=20215edit=1
#20215 [Opn-Fbk]: fputs(); (Line Feed / Carriage Return)
ID: 20215 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Windows 2000 PHP Version: 4.3RC1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: [2002-11-27 13:22:47] [EMAIL PROTECTED] I had foreseen what it is necessary since the beginning on: http://www.serveurperso.com/temp (fichier.txt and copy-paste from the show_source(fputs.php);) I send fputs.php script and fichier.txt sample text file to you ([EMAIL PROTECTED]) to make win you of the time. I don't arrive determined of or come these 0D0A(hex) in too much. It doubles has every writings. (I am French sorry for my english) [2002-11-27 06:09:24] [EMAIL PROTECTED] Can you provide a link that will allow me to download the .txt and .php files directly? (or zip them up and mail them to me) [2002-11-26 17:09:01] [EMAIL PROTECTED] I meet the problem with - Windows 2000 Pro SP3 (FAT32) - Apache 1.3.27 - PHP 4.3RC1 *with php.ini-recommended* (http://www.serveurperso.com/php.ini) This small script bug (mini notepad for admin-zone...) http://www.serveurperso.com/temp/fputs.php ! The bug with PhpMyExplorer text file editor is the same. Is it can be an Apache problem in the interpretation of the form? [2002-11-16 17:08:53] [EMAIL PROTECTED] I can't reproduce the problem using PHP 4.3RC1 or the slightly more up to date PHP 4.3 development branch and the script that you provided, either under win XP with IIS or linux. I'm using php.ini-recommended, so please make sure that you don't have any zany settings turned on in your php.ini or server configuration. [2002-11-16 06:22:55] [EMAIL PROTECTED] The last PHP CVS snapshot (Win32) doesn't correct the bug Demo/Source : http://www.serveurperso.com/temp/fputs.php The function always adds some incorrects CRLF. 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/20215 -- Edit this bug report at http://bugs.php.net/?id=20215edit=1
#20215 [Opn-Fbk]: fputs(); (Line Feed / Carriage Return)
ID: 20215 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: [2002-11-01 16:05:39] [EMAIL PROTECTED] To every writings the function fput adds jumps of lines in too much. Sample script : FORM ACTION = ?save=1 METHOD = post TEXTAREA NAME = contenu ROWS=10 COLS=40 ? $fichier = fichier.txt; if($save) { $fp = fopen($fichier, w); fputs($fp, stripslashes($contenu)); fclose($fp); } readfile($fichier); ? /TEXTAREABR INPUT TYPE = submit VALUE = Enregistrer /FORM -- Edit this bug report at http://bugs.php.net/?id=20215edit=1