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($file2 parse) {
$chunksize = 1*(1024*1024); // how many bytes per chunk
$buffer = '';
$handle = fopen($file2par se, 'rb');
if ($handle === false) {
return false;
}
while (!feof($handle) ) {
$buffer.=fread( $handle, $chunksize);
}
fclose($handle) ;
$this->rdf_content=$b uffer;
}
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_t ime from php.ini from 300 to 30000, but that
didn't help.
Does anybody have experience with it?
--
Tomislav Bilic
Escape d.o.o.
--
GSM: +385 91 577 1025
ICQ: 1824223
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($file2 parse) {
$chunksize = 1*(1024*1024); // how many bytes per chunk
$buffer = '';
$handle = fopen($file2par se, 'rb');
if ($handle === false) {
return false;
}
while (!feof($handle) ) {
$buffer.=fread( $handle, $chunksize);
}
fclose($handle) ;
$this->rdf_content=$b uffer;
}
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_t ime from php.ini from 300 to 30000, but that
didn't help.
Does anybody have experience with it?
--
Tomislav Bilic
Escape d.o.o.
--
GSM: +385 91 577 1025
ICQ: 1824223
Comment