You are here: Reading 600Mb XML file « All PHP « IT news, forums, messages
Reading 600Mb XML file

Posted by Tomislav Bilic on 07/01/05 14:42

Hello,

I need to parse one XML file that has size of 600Mb. Parsing itself is
not a problem. Problem occures while reading the file that large.

Here is the code:

function set_file($file2parse) {
$chunksize = 1*(1024*1024); // how many bytes per chunk
$buffer = '';
$handle = fopen($file2parse, 'rb');
if ($handle === false) {
return false;
}
while (!feof($handle)) {
$buffer.=fread($handle, $chunksize);
}
fclose($handle);
$this->rdf_content=$buffer;
}


After cca. 5-10 minutes of execution, error occures:

CGI Timeout
The specified CGI application exceeded the allowed time for processing.
The server has deleted the process.

I changed max_execution_time from php.ini from 300 to 30000, but that
didn't help.

Does anybody have experience with it?

--
Tomislav Bilic
Escape d.o.o.
http://www.escapestudio.net
--
GSM: +385 91 577 1025
ICQ: 1824223

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация