Re: Parsing large file
| From: | William Moore | Date: | Tue, 31 Aug 2004 19:31:20 +0000 |
| Subject: | Re: Parsing large file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195329@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?
Without knowing more information (eg: Any errors, does the script run
completely, partially, or not at all?) I would say that you could
running into the script execution timeout. Check your php.ini file
for max_execution_time and adjust accordingly.
If you are surpassing max_execution_time then you will notice that the
script runs correctly, but it will not finish parsing all of the data.
If you check the DB, do some of the records show up there?
-William