Re: Parsing large file

From: Date: Tue, 31 Aug 2004 21:00:50 +0000
Subject: Re: Parsing large file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195341@lists.php.net to get a copy of this message
We have a text file that is 2.2gb in size that we are trying to parse using PHP to put the content into a mysql database. This file contains 40 million individual lines of data. Basically PHP isn't parsing it. Any suggestions of how we could do this?
Process the file line-by-line instead of all-at-once, using fgets(). Check your max execution time, as William suggests. Post a little example code or an error message. ---------------------------------------------------------------- michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html


« previous php.general (#195341) next »