check_wurfl.php test script is in loop

Installing and configuring Tera-WURFL on your server.

check_wurfl.php test script is in loop

Postby leecher » Wed Jul 14, 2010 7:33 am

I installed TeraWURFL and everything seemed to be OK, until I've started teh final chech wurfl demo script. The result is, that the script was processing for hours (in the longest case - 2 hours), without outputting any data. I've investigated the code and came to the conclusion, that everything comes from line 314 in TeraWurfl.php:
$this->addCapabilities(array($this->matchDataKey => $this->matchData))

When I'd commented it, the script gave me this result:

Time to load TeraWurfl.php:0.0062129497528076
Time to initialize class:0.00028419494628906
Time to find the user agent:0.00069594383239746
Total:0.0071930885314941

Total Queries: 1 (Found in cache)
Test resulted in an inconclusive match

array (
'tera_wurfl' =>
array (
'num_queries' => 0,
'actual_root_device' => '',
'match_type' => '',
'matcher' => '',
'match' => false,
'lookup_time' => 0,
'fall_back_tree' => '',
),
)


Why is this happening and how can I fix it?
leecher
 
Posts: 9
Joined: Wed Jul 14, 2010 6:10 am

Re: check_wurfl.php test script is in loop

Postby kamermans » Wed Jul 14, 2010 8:56 pm

I have not seen this problem before. Can you please go to the statistics page in the Tera-WURFL admin page and tell me how many rows are in the MERGE table (mine has 13219)? Also, what kind of server are you hosting this on?
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: check_wurfl.php test script is in loop

Postby leecher » Thu Jul 15, 2010 5:07 am

It's empty:

MERGE
TeraWurflMerge Rows: 0
Actual Devices: 0
Table Size: 0 B
Purpose:
The MERGE table holds all the data from the WURFL file, whether it be local, remote or remote CVS, whenever a new WURFL is loaded, it is loaded into this table first, then it is filtered through all the UserAgentMatchers and split into many different tables specific to each matching technique. This MERGE table is retained for a last chance lookup if the UserAgentMatchers and INDEX table are unable to provide a conclusive match.
INDEX
TeraWurflIndex Rows: 13281
Table Size: 362.02 KB
Purpose:
The INDEX table acts as a lookup table for WURFL IDs and their respective UserAgentMatchers.
CACHE
TeraWurflCache Rows: 2
Table Size: 380 B
Purpose:
The CACHE table stores unique user agents and the complete capabilities and device root that were determined when the device was first identified. Unlike version 1.x, the CACHE table stores every device that is detected permanently. When the device database is updated, the cached devices are also redetected and recached. This behaviour is configurable.
leecher
 
Posts: 9
Joined: Wed Jul 14, 2010 6:10 am

Re: check_wurfl.php test script is in loop

Postby leecher » Thu Jul 15, 2010 5:47 am

On update of teh DB:

Database Update OKTotal Time: 8.6143200397491
Parse Time: 3.3328831195831 (TeraWurflXMLParser_SimpleXML)
Validate Time: 0.04208517074585
Sort Time: 0.99592804908752
Patch Time: 0.2553858757019
Database Time: 3.9855468273163
Cache Rebuild Time: 0.0024909973144531
Number of Queries: 304
PHP Memory Usage: 94.93 MB
--------------------------------
WURFL Version: www.wurflpro.com - 2010-06-03 11:55:51 (Thu Jun 03 12:01:14 -0500 2010)
WURFL Devices: 13243
PATCH New Devices: 38
PATCH Merged Devices: 2


Still MERGE is empty.
leecher
 
Posts: 9
Joined: Wed Jul 14, 2010 6:10 am

Re: check_wurfl.php test script is in loop

Postby leecher » Mon Jul 19, 2010 4:45 am

kamermans,

Could you post a dump of the DB with the 3 main tables (index, emrge and the 3rd one) to try to use it that way?
It seems something is not happening when I'm trying to update the DB, but theer are no logs about.
leecher
 
Posts: 9
Joined: Wed Jul 14, 2010 6:10 am

Re: check_wurfl.php test script is in loop

Postby kamermans » Mon Jul 19, 2010 8:08 am

Sure, I will post them in 8-10 hours when I get back home.
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: check_wurfl.php test script is in loop

Postby leecher » Tue Jul 20, 2010 10:31 am

10x - I will wait for it
leecher
 
Posts: 9
Joined: Wed Jul 14, 2010 6:10 am

Re: check_wurfl.php test script is in loop

Postby kamermans » Tue Jul 20, 2010 1:38 pm

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: check_wurfl.php test script is in loop

Postby leecher » Wed Jul 21, 2010 10:42 am

10x - I've solved the problem. Everything come from the procedures and calling them:
CREATE DEFINER=`ua_detector`@`192.168.140.168` PROCEDURE `TeraWurfl_FallBackDevices`(current_fall_back VARCHAR(64))

The problem is, as you know, that mysql defines an unique user from USERNAME + HOST. Unfortinetlly your procedures are set with CREATE DEFINER=`ua_detector`@`%` and so - the user is invalid and the mysql can't call them. Probably that should be classificied as a bug, or as a specific case for my server configuration.


Have a nice day :)
leecher
 
Posts: 9
Joined: Wed Jul 14, 2010 6:10 am

Re: check_wurfl.php test script is in loop

Postby kamermans » Wed Jul 21, 2010 1:17 pm

Indeed - that is interesting! I will have to think about how to change the code to support this. I think if you leave the DEFINER statement out completely it will use the default, which should work if the same user that defines the procedure executes it. Thanks for the tip!
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


Return to Installation / Configuration

Who is online

Users browsing this forum: No registered users and 2 guests