You are here:  » Presales question


Presales question

Submitted by loet on Mon, 2007-09-17 18:36 in

Hello David,

I am looking at the program and the forum now for some time and I think the program can be of great use for me. I also think you give great support to all the questions in the forum.

I want to use the script to parse xml to a mysql databse.
I have seen lots of examples here so I think I can figure that out, maybe with some help.
But can Magic Parser also parse big xml files without stopping the webserver?
I have 2 very big files from my merchant that have to parsed, about 110Mb aand 220Mb.

Submitted by support on Mon, 2007-09-17 18:41

Hi,

Thank you for your interest in Magic Parser.

The script itself has no problem with very big files. In fact, one of the benefits that is does not have to load the file into memory, so there is no problem there.

However, it is possible that your web server is configured to stop PHP scripts after a certain time, like 30 seconds. If this is the case, and whether or not you have the time to process all your records depends on lots of things, so it is impossible to say. In the first instance however, you should try your script using:

<?php
  set_time_limit
(0);
?>

...on the first line. This will disable any time limit if your account is allowed to do that. If you do find that your script is stopping, it is always worth contacting your host to ask if you can have the limit removed on your account. It is there to stop scripts that have crashed, but if you explain that you are processing large files you will probably find that your host is OK with removing the limit.

Hope this helps!
Cheers,
David.

Submitted by loet on Mon, 2007-09-17 18:46

Thanks for the quick reply.

I do my own hosting so I can also make changes to php.in if needed.
I am giving it a try and will order the script to get started with it.

Loet