CodeIgniter WURFL API Wrapper Library |
[eluser]simonmaddox[/eluser]
I've released my CI WURFL API Wrapper Library, which allows you to take the new WURFL API and access it in CodeIgniter. If you don't know what WURFL is, see here: http://wurfl.sourceforge.net/backgroundinfo.php You use it as follows: Code: $this->wurfl->load($this->agent->agent_string()); // You can also pass through a $_SERVER array Instructions on how to install, plus downloads, are here: http://github.com/simonmaddox/codeignite...ree/master If anyone has bugs, comments, suggestions, please post.
[eluser]holly123[/eluser]
first at all: hi to all in this forum. i'm new here because i really exited about codeigniter... now i wanted to build a webpage for mobile phones and tried to use the wurfl-database but it won't work. if i trie to read the device-capabilities there is alway a buffer-overflow.. i copied the wurfl-library in the /applications/libraries - folder then i copied the wurfl.xml, web_browser_patch.xml and wurfl-config.xml in the /applications/config - folder and created a folder /applications/config/cache so, now alway when i try to get the device-capabilities with: Code: $this->load->library('wurfl'); i'll get the following error: Code: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 524377 bytes) in D:\xampp\htdocs\philipp\CodeIgniter_1.7.1\system\application\libraries\WURFL\FileManager.php on line 84 edit: i forgot to post the error-description from codeigniter: Code: A PHP Error was encountered my wurfl-config.xml is: Code: <wurfl-config> please help me! - thank you! best, holly
[eluser]pistolPete[/eluser]
Code: Fatal error: Allowed memory size of 33554432 bytes exhausted ...
[eluser]holly123[/eluser]
no, there has to be an other problem.. i had the same effect as i set the memory_limit up to 100MB!!! why does the wurfl-lib nees so much memory???
[eluser]aruna[/eluser]
[quote author="pistolPete" date="1235938353"] Code: Fatal error: Allowed memory size of 33554432 bytes exhausted ... hi , even after setting the memory limit in php.in file ...still i m getting the error.please resolve it.....
[eluser]simonmaddox[/eluser]
Hi, What else are you doing on the page/server? I've got a page looking up 9 phones in WURFL, and it's using just under 8MB. Try putting this at the top of your code, to make sure the memory limit is actually being set: Code: ini_set(’memory_limit’, ‘64M’); I'm not sure what the CodeIgniter (in fact, I think it's a WURFL API error) error means, but if it's not set up correctly you'll see all sorts of odd errors... Cheers, Simon
[eluser]aruna[/eluser]
[quote author="simonmaddox" date="1236730223"]Hi, What else are you doing on the page/server? I've got a page looking up 9 phones in WURFL, and it's using just under 8MB. Try putting this at the top of your code, to make sure the memory limit is actually being set: Code: ini_set(’memory_limit’, ‘64M’); I'm not sure what the CodeIgniter (in fact, I think it's a WURFL API error) error means, but if it's not set up correctly you'll see all sorts of odd errors... Cheers, Simon[/quote] thanks,its working now......
[eluser]RaBu[/eluser]
Hi, I also have some problems, and can't get it to work - I get this error: Code: [12-Apr-2009 21:21:54] PHP Fatal error: Call to a member function getDeviceForUserAgent() on a non-object in /Applications/MAMP/htdocs/sandbox/system/application/libraries/Wurfl.php on line 27 In application/config i have: wurfl.xml wurfl_config.xml web_browsers_patch.xml cache (read/write able folder) In application/libraries i have: Wurfl.php WURFL (folder with all the contents from http://m.wurflpro.com/~wurfl/php/wurfl-php-1.0.tar.gz) Hope someone can help me with a pointer in the right direction.
[eluser]RaBu[/eluser]
Okay, now I have tried with only putting the contents from the WURFL folder from http://m.wurflpro.com/~wurfl/php/wurfl-php-1.0.tar.gz, in application/libraries. But in the WURFLManagerProvider.php file, it makes these calls: Code: define('LIB_DIR', dirname(__FILE__).'/../lib');
[eluser]RaBu[/eluser]
Hmm... anybody? Can you please help with a bit more clearly guide to versions, file-structure and the needed modifications necessary to the files? |
Welcome Guest, Not a member yet? Register Sign In |