Page 1 of 2

updatedb.php errors

PostPosted: Tue Apr 19, 2011 3:43 pm
by marcguay
Hi Steve and friends,

I've been getting a new fun set up errors the last couple of times I've tried to update the DB from the remote WURFL XML source. Here's the output:

Code: Select all
Downloading WURFL from http://downloads.sourceforge.net/project/wurfl/WURFL/latest/wurfl-latest.zip ...
done (/var/www/virtual/site.com/htdocs/wurfl/data/wurfl.xml: 15.75 MB [954.07 KB compressed])
Downloaded in 4.30009317398 sec @ 1.82 Mbps


Warning: simplexml_load_file() [function.simplexml-load-file]: /var/www/virtual/site.com/htdocs/wurfl/data/:1: parser error : Document is empty in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 36

Warning: simplexml_load_file() [function.simplexml-load-file]: in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 36

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 36

Warning: simplexml_load_file() [function.simplexml-load-file]: /var/www/virtual/site.com/htdocs/wurfl/data/:1: parser error : Start tag expected, '<' not found in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 36

Warning: simplexml_load_file() [function.simplexml-load-file]: in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 36

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 36

Notice: Trying to get property of non-object in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 75

Notice: Trying to get property of non-object in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 75

Warning: Invalid argument supplied for foreach() in /var/www/virtual/site.com/htdocs/wurfl/TeraWurflXMLParsers/TeraWurflXMLParser_SimpleXML.php on line 75
Database Update OKTotal Time: 37.7275919914
Parse Time: 4.12664294243 (TeraWurflXMLParser_SimpleXML)
Validate Time: 0.00890493392944
Sort Time: 2.80864500999
Patch Time: 0.578366994858
Database Time: 7.32416415215
Cache Rebuild Time: 22.8808679581
Number of Queries: 13701
PHP Memory Usage: 33.36 MB
--------------------------------
WURFL Version: www.wurflpro.com - 2011-03-06 11:10:16 (Sun Mar 06 11:11:41 -0600 2011)
WURFL Devices: 14221
PATCH New Devices: 40
PATCH Merged Devices: 2
Return to administration tool.


Any ideas? Could this be fallout from a too-much-memory-being-used problem? It's not obvious what's happening from the errors - seems to me like it's trying to parse an empty file or something.

Re: updatedb.php errors

PostPosted: Tue Apr 19, 2011 9:06 pm
by kamermans
Hmmm, this is strange, especially because it shows that it loaded 14221 devices. Normally it would throw an exception if it could not parse the document at all. I'll see if something has been changed in the structure of the WURFL file.

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 9:37 am
by marcguay
Hi Steve,

Yeah I thought it was strange (but nice) that it updated the DB properly despite the errors. I just verified that the zip & xml downloaded by Tera-WURFL and the zip & xml available on sourceforge are identical so it's not a file corruption issue.

Marc

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 4:11 pm
by marcguay
Crummy, turns out the update wasn't complete after all. Now I'm trying to find the last compatible WURFL file with tera-wurfl 2.1.4. Help?

Edit: I just reverted to the one from March 6th and had similar errors - and that one worked previously. I'm reverting the new web browsers patch and seeing if that makes a difference.

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 4:20 pm
by kamermans
Are you using 2.1.4 from GitHub or the Tera-WURFL.com site? I would recommend grabbing the copy from https://github.com/kamermans/Tera-WURFL .

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 4:26 pm
by marcguay
I believe it's 2.1.4 from the .com.

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 4:31 pm
by marcguay
Reverting everything back to the previously functioning state is still giving the same errors. It's times like these...

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 4:45 pm
by kamermans
Maybe PHP or SimpleXML or LibXML was updated. I would try the GitHub version which uses XMLReader instead of SimpleXML.

Re: updatedb.php errors

PostPosted: Wed Apr 20, 2011 4:57 pm
by marcguay
I had issues last time with XMLReader running out of memory so I had to revert to SimpleXML. I hope my host didn't make changes without notifying his clients.

Re: updatedb.php errors

PostPosted: Thu Apr 28, 2011 8:26 pm
by kamermans
Hi Marc, is there any way that you could run this script on the server that's giving you trouble? I'm trying to determine if a certain PHP version or extension is responsible for the problem.

Code: Select all
<pre>
<?php
echo "PHP ".phpversion()."\n\n";
$exts = array('xml', 'libxml', 'SimpleXML', 'XMLReader', 'mysql', 'MySQLi');
foreach($exts as $extname){
   try{
      $ext = new ReflectionExtension($extname);
      echo $ext->info();
   }catch(Exception $e){
      echo "ERROR: Extension $extname is not available\n\n";
   }
}
?>
</pre>