Since v5.0.x: DOMDocument::load(): I/O warning

Discuss about Group-Office development here

Moderator: Developers

michaeled
Posts: 86
Joined: Wed May 09, 2012 2:00 pm

Since v5.0.x: DOMDocument::load(): I/O warning

Postby michaeled » Mon May 05, 2014 12:04 pm

Hi !

I was in version 4 and just go into 5.0.55.
We developed a portlet that displays the tide times. To do this, it parses an xml file.
Since the update, the portlet no longer works and I get this error message: PHP Warning: DOMDocument :: load (): I / O warning: failed to load external entity "/ var / www / groupoffice .. ... "
Xml file is not empty or corrupted. PHP has not been updated and php.ini has not changed (including allow_url_fopen = On).

What might be the problem?

Thanks,

Michael.
michaeled
Posts: 86
Joined: Wed May 09, 2012 2:00 pm

Re: Since v5.0.x: DOMDocument::load(): I/O warning

Postby michaeled » Tue May 06, 2014 8:01 am

Is there any modification with memory_limit ?
richarddodd
Posts: 66
Joined: Fri Jun 21, 2013 2:55 pm

Re: Since v5.0.x: DOMDocument::load(): I/O warning

Postby richarddodd » Tue May 06, 2014 9:04 am

When I have problems like this I tend to either hunt round the source trying to understand what is happening, or use xdebug (with netbeans in my case) and inspect what is happening as the error is thrown.

In this case it looks like groupoffice is using a library to open the xml files, so maybe you should try writing a simple script using the same library to see if that works, so you will know if the problem is with the lib/xml file or with groupoffice.
michaeled
Posts: 86
Joined: Wed May 09, 2012 2:00 pm

Re: Since v5.0.x: DOMDocument::load(): I/O warning

Postby michaeled » Tue May 06, 2014 10:10 am

Exactly the proble is in this code :

Code: Select all

$xmlfile = "/var/www/marees.xml"; //Fichier dans lequel récupérer les données
//Chargement du fichier
$ent = new DOMDocument();
$ent->load($xmlfile);
if(!(@$ent->load($xmlfile)))
{
  echo "Unable to load : " . $xmlfile;
//  exit();
}
This code is called by a portlet (developped by us). It was working perfectly before the upgrade...
The portlet works one time of 5 tryed (random).
richarddodd
Posts: 66
Joined: Fri Jun 21, 2013 2:55 pm

Re: Since v5.0.x: DOMDocument::load(): I/O warning

Postby richarddodd » Tue May 06, 2014 6:07 pm

Do you get any helpful messages if you remove the error suppressing ("@") from the 5th line?

Who is online

Users browsing this forum: No registered users and 1 guest

cron