I've run into a rather weird issue, I'm working on a script that fetches an XML document for processing, using SimpleXMLElement. After about 10 seconds the script is terminating and I am getting the download dialogue to try and download the script, as if php is not being intepreted at all. The odd thing about this is that this that the script will execute fine sometimes, others am I running into this problem.
Currently I am using file_get_contents() to fetch the xml document, which seems to be causing the problem. I have also tried inputting the request url directly to the SimpleXMLElement object, with the same results.
I take it the request is timing out and borking PHP. If the connection is timing out, I do not understand why it gives me download dialogue. I have tried using
Code: Select all
set_time_limit(0);
ini_set('memory_limit', '32mb');
ignore_user_abort();
Although I don't see how that would help, it was worth a try. The XML document I am fetching is rather small, and when working it only takes about 3 seconds to fetch the XML document (found on another server).
Any thoughts?