Bug #52367 [Fbk->NoF]: file() return nothing for a file over than 10000 lines
Edit report at https://bugs.php.net/bug.php?id=52367&edit=1
ID: 52367
Updated by: php-bugs@lists.php.net
Reported by: menz12x at gmail dot com
Summary: file() return nothing for a file over than 10000 lines
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Performance problem
Operating System: windows xp
PHP Version: 5.2.13
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-07-18 23:36:38] degeberg@php.net
Is it possible that you hit the memory_limit and that you've turned display_errors off so you
get a blank page?
------------------------------------------------------------------------
[2010-07-17 21:00:45] rasmus@php.net
You will need to provide some more info here. Works perfectly on Linux on files
10x that. eg.
11:58am new:~> wc test.txt
100003 300003 26033650 test.txt
11:58am new:~> php -a
Interactive shell
php > error_reporting(-1);
php > $a = file('./test.txt');
php > echo count($a);
100003
php > echo $a[9999];
[9997] =>
99989998999899989998999899989998999899989998999899989998999899989998999899989998
99989998999899989998999899989998999899989998999899989998999899989998999899989998
9998999899989998999899989998999899989998
------------------------------------------------------------------------
[2010-07-17 20:21:47] menz12x at gmail dot com
Description:
------------
<?php
if (is_file($Fichier)) {
if ($TabFich = file($Fichier))
{
$numTotal=count($TabFich);
echo count($TabFich);
}
?>
Test script:
---------------
file() function return FALSE for a file over than 10000 lines
Expected result:
----------------
i'd like to see the number of lines the file() function returns
Actual result:
--------------
the file () function returns nothing
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52367&edit=1
Thread (4 messages)