#23793 [Opn->Bgs]: file() and file_gets_content() cripple file content
| From: | moriyoshi@php.net | Date: | Sat, 24 May 2003 16:41:56 +0000 |
| Subject: | #23793 [Opn->Bgs]: file() and file_gets_content() cripple file content | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40353@lists.php.net to get a copy of this message | ||
ID: 23793
Updated by: moriyoshi@php.net
Reported By: p dot klein at letsmakesense dot de
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows XP
PHP Version: 4.3.2RC4
New Comment:
Dupe of bug #23770
Previous Comments:
------------------------------------------------------------------------
[2003-05-24 11:39:22] p dot klein at letsmakesense dot de
I used the following script to generate a text string
text.php:
$str = "";
for($i = 0; $i < 12950; $i++)
{
if($i%3 == 0)
{
$str .= "a";
}
elseif($i%3 == 1)
{
$str .= "b";
}
else
{
$str .= " ";
}
}
echo $str;
Then I read the file with either file() or file_get_contents() like:
$url = "http://localhost/text.php";
$result = file_get_contents($url);
/*$res_arr = file($url);
$result = join("",$res_arr);*/
printf("%s\n", $result);
With small files everything works fine. But starting from a file size
of about 12950 bytes the functions the content of the test file gets
crippled. The bigger the file the worse it gets. Large parts of file
get cut.
My system:
OS: Windows XP home SP1
Server: Apache 2.0.44
PHP Verson: 4.3.2RC4
The bug cannot be reproduced when I call a text file by the file system
(C:\text.txt) or using the php4ts.dll of PHP 4.3.1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23793&edit=1