updatedb.php errors

Integrating Tera-WURFL in your applications.

updatedb.php errors

Postby marcguay » Tue Apr 19, 2011 3:43 pm

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.
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: updatedb.php errors

Postby kamermans » Tue Apr 19, 2011 9:06 pm

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.
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: updatedb.php errors

Postby marcguay » Wed Apr 20, 2011 9:37 am

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
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: updatedb.php errors

Postby marcguay » Wed Apr 20, 2011 4:11 pm

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.
Last edited by marcguay on Wed Apr 20, 2011 4:22 pm, edited 1 time in total.
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: updatedb.php errors

Postby kamermans » Wed Apr 20, 2011 4:20 pm

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 .
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: updatedb.php errors

Postby marcguay » Wed Apr 20, 2011 4:26 pm

I believe it's 2.1.4 from the .com.
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: updatedb.php errors

Postby marcguay » Wed Apr 20, 2011 4:31 pm

Reverting everything back to the previously functioning state is still giving the same errors. It's times like these...
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: updatedb.php errors

Postby kamermans » Wed Apr 20, 2011 4:45 pm

Maybe PHP or SimpleXML or LibXML was updated. I would try the GitHub version which uses XMLReader instead of SimpleXML.
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: updatedb.php errors

Postby marcguay » Wed Apr 20, 2011 4:57 pm

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.
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: updatedb.php errors

Postby kamermans » Thu Apr 28, 2011 8:26 pm

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>
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Next

Return to Using Tera-WURFL

Who is online

Users browsing this forum: No registered users and 1 guest

cron