Installing Tera-WURFL

 
 
WURFL (=Wireless Universal Resource File) is an XML configuration file which contains information about capabilities and features of almost all wireless devices in the world. Many people have contributed to this project but the core team consists of Andrea Trasatti and Luca Passani. WURFL can be used for free in any application.

More information can be found at: http://wurfl.sourceforge.net/

rss feed

Quick guides






Installing Tera-WURFL



Information
The Tera-WURFL can be downloaded from:
http://www.tera-wurfl.com/

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Apache 2.0 or higher.
MySQL 3.23.55 or higher.
PHP 4.3.3 or higher or PHP 5.


Procedure
  1. Create the following directory on the webserver docroot:
    <docroot>/tera_wurfl

  2. Download and unzip tera_wurfl-beta-v1.4.4.zip into <docroot>/tera_wurfl

  3. Download and unzip wurfl.zip into <docroot>/tera_wurfl/data.
    The data directory should contain the wurfl.xml file.

  4. Download the web_browsers_patch.xml and move it into <docroot>/tera_wurfl/data

  5. Download and unzip device_pix_v8.zip and move it into <docroot>/tera_wurfl/device_pix
    This file can de downloaded from:
    http://wurfl.sourceforge.net/utilities/device_thumbnails.php

  6. Edit file <docroot>/tera_wurfl/tera_wurfl_config.php.
    • Modify the following lines into:
      define("DB_USER","root");
      define("DB_PASS","mysecret");
      define("DB_SCHEMA","mobilefish_app");
      define("WURFL_PATCH_ENABLE", false);
      define("WURFL_PATCH_FILE", DATADIR.'web_browsers_patch.xml');

  7. Open a browser and enter the following url:

    http://www.mobilefish.com/tera_wurfl/admin/index.php

    You should something like:

    Tera-WURFL admin

  8. Click the link "Update database from local file"

    You should something like:

    Tera-WURFL database

  9. Edit file <docroot>/tera_wurfl/tera_wurfl_config.php.
    • Modify the following line into:
      define("WURFL_PATCH_ENABLE", true);

  10. Go to http://www.mobilefish.com/tera_wurfl/admin/index.php
    and click link "Update PATCH database from your local patch file"

    You should something like:

    Tera-WURFL database update

  11. To check if the installation is successfull, go to http://www.mobilefish.com/tera_wurfl/admin/index.php
    and click link "Tera-WURFL test script"

    You should something like:

    Tera-WURFL check

    In the textbox "Mobile device user agent", you can enter the user agent, for example SonyEricssonF500i, and it will find all information about this device.
    See wurfl.xml: <device user_agent="SonyEricssonF500i" ...>

  12. The script tera_wurfl_updatedb.php creates three tables:

    Tera-WURFL database model

    tera_wurfl_devices
    The device table holds the data from the WURFL file and it is loaded into this table first. The data in this table is never modified, and if patching is disabled, this table is queried for the device in question.

    tera_wurfl_patch
    The patch table holds the data from the patch file, much like the device table, this data is not modified unless a new patch is loaded. When patching is enabled, this data is merged with the device table to create the hybrid table.

    tera_wurfl_hybrid
    The hybrid table is a combination of the device table and the patch table. If you have patching enabled, this table is queried for the device in question.

  13. Password protect directory <docroot>/tera_wurfl, see tutorial:
    Using Apache .htaccess file, password protecting directories