|  | 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] |