I read everything I could about this error without finding a solution.
I have a simple page that looks like this:
$xmlfile = "/var/www/marees.xml"; //Fichier dans lequel récupérer les données $ent = new DOMDocument(); $ent->load($xmlfile); if(!(@$ent->load($xmlfile))) { echo "Unable to load : " . $xmlfile; exit(); }
I get three times out of four, accidentally this error:
PHP warning: DOMDocument :: load (): I / O warning: failed to load external object "/var/www/marees.xml" in / var / www / marees / test 2.php on line 7
When I restart Apache, the script works fine for 5 minutes, an error appears.
The XML file weighs 595 kB, is present and readable.
What could be the problem?
source share