Description of problem: PHP suddenly fails to read remote and local files through libxml. The behaviour is erratic. It has happened twice. Then after a while everything suddenly works as expected again. Version-Release number of selected component (if applicable): PHP 5.1.6 How reproducible: $doc = new DOMDocument(); $doc->load('some_xml_file.xml'); echo $doc->saveXML(); Steps to Reproduce: This is a tough one since it's erratic. The problem persisted after restarting apache and rebooting the entire system. Then the problem went away without me doing anything. 1. Run Soap webservices and Soap clients 2. Read local files through DOM XML. Actual results: Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in Expected results: display the XML. Additional info: The following form thread describes the same problem: http://www.phparch.com/discuss/index.php/t/3269/d462c1c5f7641301d39e52a2b5e0e4fb/ It also has an answer to the problem. However I couldn't find specifics about it. quoting: "This problem is fixed in 5.2. When using libxml_set_streams_context, the context was never destroyed for the process when the request terminated so would remain for every request made within the process. As far as ext/soap goes, it can create an xml stream context when needed. It does look like there is a case within the code that it could error out (extra-ordinary circumstance) and ext/soap does not reset the context back to its original state (needs to be fixed). If this is a continual issue for you, upgrade to 5.2 (where the context is reset at the end of every request) or make sure you manually reset the xml context (using the method you are currently using) before your script terminates. Rob"
It's a little tricky to work out exactly what fix upstream this corresponds to; can you try out the test packages from here: http://people.redhat.com/~jorton/Tikanga-php/ (note, untested by Red Hat QA, no warranty, etc!)
Hi Joe, thank you for the response. We could install those packages. However we have no way to test them since we're still unsure what triggered the bug and unable to reproduce the situation. I'll discuss here and get back on it. We did learn later that there was a IPv6 malfunction on the network that day. I suspect this somehow triggered something in our SOAP requests, messing up the entire PHP stream context.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0327.html