Bug #13626 Updated: fwrite writes more data to file than in output string
| From: | sniper@php.net | Date: | Thu, 11 Jul 2002 06:29:30 +0000 |
| Subject: | Bug #13626 Updated: fwrite writes more data to file than in output string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13829@lists.php.net to get a copy of this message | ||
ID: 13626
Updated by: sniper@php.net
Reported By: jayp@clear.net.nz
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: W2K
PHP Version: 4.0.6
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[2001-10-10 08:22:11] sander@php.net
Reclassified.
------------------------------------------------------------------------
[2001-10-10 06:01:53] jayp@clear.net.nz
I look through the other bug reports and it is the same issues with 0A
gets changed to 0D 0A
------------------------------------------------------------------------
[2001-10-10 05:47:39] jayp@clear.net.nz
I have a SQL DB with GIF data field. f.ex there are 2*27006 bytes in
there (hex strings). I can retrieve them without any problems but when
I do
$fp = fopen($fn, 'wb');
$Bin = ConvertToBinary($GIFString);
$BlockLength=strlen($Bin);
set_file_buffer($fp, 0);
fwrite($fp,$Bin);
fclose($fp);
$GIFString has the correct size of 2*27006,
$Bin has the correct binary size of 27006.
But the file has the size of 27176 bytes. I have no idea where the
addiotnal 170 bytes are coming from (doesn't help when add the
$BlockLength to fwrite). After 0x363 there is a 1 byte shift etc...
regards
Jay
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13626&edit=1