Page 1 of 1

Notice Undefined index: id

PostPosted: Mon Sep 12, 2011 4:12 pm
by 8vius
Whenever I try to use Tera Wurfl to get user agent information I get this notice. I can't find a way to make it go other than setting error_reporting(0) on my TeraWurfl.php file, the problem with that is that my app stops reporting errors entirely so I have to keep going back to unset it when something doesn't work properly. Any idea of how to fix this?

Re: Notice Undefined index: id

PostPosted: Thu Sep 15, 2011 10:26 am
by kamermans
It sounds like the WURFL data is not being loaded properly. Can you try do an update from local and see if the problem remains?

Re: Notice Undefined index: id

PostPosted: Thu Sep 15, 2011 10:43 am
by 8vius
Up date from local? Can you please explain?

Re: Notice Undefined index: id

PostPosted: Thu Sep 15, 2011 1:10 pm
by kamermans
Sure :) You'll want to go to the admin/ directory in a web browser which will take you to the administration interface. From there, click on "Update database from local file", which will reload the mobile device database (WURFL file).

Re: Notice Undefined index: id

PostPosted: Thu Sep 15, 2011 4:16 pm
by 8vius
This was the output:

Code: Select all
Notice: Undefined offset: 0 in /Applications/XAMPP/xamppfiles/htdocs/tera-wurfl/TeraWurfl.php on line 337

Notice: Undefined offset: 0 in /Applications/XAMPP/xamppfiles/htdocs/tera-wurfl/TeraWurfl.php on line 337
Database Update OK
Total Time: 37.4755020142
Parse Time: 6.52497410774 (TeraWurflXMLParser_XMLReader)
Validate Time: 0.0843639373779
Sort Time: 2.81618690491
Patch Time: 0.0638360977173
Database Time: 27.7397489548
Cache Rebuild Time: 0.246392011642
Number of Queries: 323
PHP Memory Usage: 38.68 MB
--------------------------------
WURFL Version: www.wurflpro.com - 2011-04-24 12:07:53 (Sun Apr 24 12:09:17 -0500 2011)
WURFL Devices: 14346
PATCH New Devices: 40
PATCH Merged Devices: 1

Re: Notice Undefined index: id

PostPosted: Thu Sep 15, 2011 4:25 pm
by 8vius
The error persists

Re: Notice Undefined index: id

PostPosted: Thu Sep 15, 2011 6:20 pm
by kamermans
Can you please edit your TeraWurflConfig.php and change the DB_CONNECTOR from MySQL5 to MySQL4, then reload the database as you did previously? This will work with MySQL 5 as well, but will avoid some features that can cause problems with certain environments.

Re: Notice Undefined index: id

PostPosted: Fri Sep 16, 2011 10:26 am
by 8vius
New output:

Code: Select all
Database Update OK
Total Time: 24.9264798164
Parse Time: 6.14362978935 (TeraWurflXMLParser_XMLReader)
Validate Time: 0.0848231315613
Sort Time: 2.80788993835
Patch Time: 0.0445230007172
Database Time: 15.7103750706
Cache Rebuild Time: 0.13523888588
Number of Queries: 334
PHP Memory Usage: 38.68 MB
--------------------------------
WURFL Version: www.wurflpro.com - 2011-04-24 12:07:53 (Sun Apr 24 12:09:17 -0500 2011)
WURFL Devices: 14346
PATCH New Devices: 40
PATCH Merged Devices: 1


Now my code stopped working, I'll check to see what the problem is and report

Re: Notice Undefined index: id

PostPosted: Fri Sep 16, 2011 11:24 am
by 8vius
Fixed, the problem was my code at the end not the Tera, thank you very much for your help

Re: Notice Undefined index: id

PostPosted: Sun Sep 18, 2011 8:39 am
by kamermans
I'm glad you were able to get the problem resolved!