CodeIgniter WURFL API Wrapper Library |
[eluser]Unknown[/eluser]
i got problem with wurfl my instalation looks like above: main folder: app -> application -->config (wurf-config.xml) wurfl-> wurfl.xml and web_browser_patch.xml cache-> cache folder with (777 mask) in wurfl-config.xml i got (i tested with relative path too): Code: <wurfl-config> in app/libraries i got lib for CI Wurfl.php and other wurfl php files. in controler i got just: Code: function Welcome() and as result i receive this: Fatal error: Uncaught exception 'Exception' with message 'Did not expect element persistance there ' in /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/Configuration/XmlConfig.php:77 Stack trace: #0 /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/Configuration/Config.php(47): WURFL_Configuration_XmlConfig->initialize() #1 /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/Configuration/XmlConfig.php(43): WURFL_Configuration_Config->__construct('app/config/wurf...') #2 /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/Configuration/ConfigFactory.php(11): WURFL_Configuration_XmlConfig->__construct('app/config/wurf...') #3 /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/WURFLManagerProvider.php(72): WURFL_Configuration_ConfigFactory::create('app/config/wurf...') #4 /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/WURFLManagerProvider.php(59): WURFL_WURFLManagerProvider::_init('app/config/wurf...') #5 /usr/local/www/apache22/data/dev/plabudz/m in /usr/local/www/apache22/data/dev/plabudz/m/app/libraries/WURFL/Configuration/XmlConfig.php on line 77 please reply to me if you can help it is very important to me to get Wurfl work together with CI.
[eluser]Unknown[/eluser]
I have the solution: in the sample "wurfl-config.xml" file provided (http://wurfl.sourceforge.net/nphp/), there are extra blank characters (spaces, tabs) after the </patches> closing tag. That seems to confuse the XML parser on some systems (not on all systems, since I've been able to get this config file to work on at least 1 system). In my case it worked when I removed the extra characters. Hope it helps !
[eluser]Jamie Rumbelow[/eluser]
Simon, this is awesome and something I'm going to need for an upcoming project, so your timing is impeccable! You've done a great job with this library and it'll be very helpful, thanks. Jamie
[eluser]a.somervell[/eluser]
[quote author="holly123" date="1235933748"] my wurfl-config.xml is: Code: <wurfl-config> Also helps if you spell persistence (sic) correctly, which i'm sure you copied and pasted from the original error ![]()
[eluser]Eric Brown[/eluser]
This library is great. A real time-saver and perfect for my web app. I have an unusual problem I can't figure out. It almost seems that the API example scripts are better at matching than using the library which makes no sense since the method calls are exactly the same. For instance for the user-agent: MOT-24.0_/00.62 UP.Browser/6.2.3.4.c.1.123 (GUI) MMP/2.0 The devices.php file gives me the following info: * ID: mot_krzr_k1c_ver1_sub1 * Brand Name: Motorola * Model Name: KRZR K1c (Alltel,US) * Xhtml Preferred Markup:html_wi_oma_xhtmlmp_1_0 * Resolution Width:176 * Resolution Height:220 * MP3:true My library install produces: User-Agent: MOT-24.0_/00.62 UP.Browser/6.2.3.4.c.1.123 (GUI) MMP/2.0 Device: Motorola KRZR K1c (mot_krzr_k1c_ver1_sub1) Brand: Motorola Model Name: KRZR K1c Marketing Name: OS: OS Version: Release Date: 2003_january Wireless: true true Core Capabilities: * Resolution Width: 176 * Resolution Height: 220 I'm using the latest WURFL from December '09 as well as the web browser patch. The WURFL api example is using the WURFL-regression zip file. Any ideas on why my results would be different? Thanks for any help as I learn how to work with CodeIgniter.
[eluser]Eric Brown[/eluser]
Now that the PHP code has been updated in May, are there any plans to update this wrapper?
[eluser]Unknown[/eluser]
I don't mean to revive an old thread, but I redid it sort of using the new library. https://github.com/dubcanada/Codeigniter-Wurfl-Wrapper I figured it would be better to append to this rather then create my own. Anyone with more codeigniter experience then me, if you could refactor my code that would be excellent. I am not very good at OOP in PHP.
|
Welcome Guest, Not a member yet? Register Sign In |