ID:               26510
 Updated by:       [EMAIL PROTECTED]
 Reported By:      thomas303 at web dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Suse Linux 8.2
 PHP Version:      4.3.5-dev
 New Comment:

Please provide the prolematic cvs file and shortest possible script
that can be used to replicate the problem.


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

[2003-12-03 14:38:39] thomas303 at web dot de

Hi, installing PHP Version 4.3.5-dev (Dec 2 2003 02:59:04) did not
solve the problem.

Best regards,
Thomas

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

[2003-12-03 13:41:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-12-03 13:28:19] thomas303 at web dot de

Description:
------------
Hi,

I use the function fgetcsv, but it imported only 17860 of 20900 rows.

Tried \r\n and \n.

I found out, that rows are missing in between of the file, not at the
beginning or the end. When I import only these rows (grepped before),
everything works fine.

It imports some rows, misses one, imports some and so on.

The error occured the last days without a change in file structure or
php. It could be the data itself which leads to the error. I can't
reproduce it nor can I send you the file because of data protection
reasons.

With fgets and explode everything is fine again. You should check
against if fgetcsv works the same way or map fgetcsv to fgets and
explode.

Reproduce code:
---------------
$fields=fgetcsv($fp,4096,"|");

with loop and so on.

Expected result:
----------------
$fields=fgetcsv($fp,4096,"|");

should work exactly the same as

$newline=fgets($fp,4096);
$fields=explode("|", $newline);





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


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

Reply via email to