I receive the following after following the installation instructions:

Fatal error: Uncaught exception 'Exception' with message 'Did not expect element persistance there ' in /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/Configuration/XmlConfig.php:77 Stack trace: #0 /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/Configuration/Config.php(45): WURFL_Configuration_XmlConfig->initialize() #1 /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/Configuration/XmlConfig.php(43): WURFL_Configuration_Config->__construct('/home4/Myusername...') #2 /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/Configuration/ConfigFactory.php(11): WURFL_Configuration_XmlConfig->__construct('/home4/Myusername...') #3 /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/WURFLManagerProvider.php(72): WURFL_Configuration_ConfigFactory::create('/home4/Myusername...') #4 /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/WURFLManagerProvider.php(59): WURFL_WURFLManagerProvider::_init('/home4/Myusername...') #5 /home4/brian in /home4/Myusername/public_html/sites/all/modules/wurfl/lib/wurfl/WURFL/Configuration/XmlConfig.php on line 77

I am at a loss; I have NEVER been able to get this module installed on ANY site.
Help is appreciated!
Thanks!
-Brian

Comments

merilainen’s picture

Same problem here.

tapu’s picture

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 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 !

dltampa’s picture

I deleted those extra spaces and continue to get the same error.

dltampa’s picture

I think I got it also. Persistence was spelled wrong and cache needs to be Cache.

Here is the corrected wurfl-config.xml code.



wurfl.xml

web_browsers_patch.xml file dir=../WURFL/Cache file dir=../WURFL/Cache
drektar45’s picture

Hello,
I follow your instructions, I change cache to Cache and persistance to persistence and now I hava an other problem :

Fatal error: Uncaught exception 'WURFL_WURFLException' with message 'The diricetory specified for the persistence provider does not exist or it is not writable ' in /var/www/drupal/modules/wurfl/lib/wurfl/WURFL/Xml/PersistenceProvider/FilePersistenceProvider.php:46 Stack trace: #0 /var/www/drupal/modules/wurfl/lib/wurfl/WURFL/Xml/PersistenceProvider/FilePersistenceProvider.php(30): WURFL_Xml_PersistenceProvider_FilePersistenceProvider->initialize(Array) #1 /var/www/drupal/modules/wurfl/lib/wurfl/WURFL/Xml/PersistenceProvider/PersistenceProviderManager.php(49): WURFL_Xml_PersistenceProvider_FilePersistenceProvider->__construct(Array) #2 /var/www/drupal/modules/wurfl/lib/wurfl/WURFL/Xml/PersistenceProvider/PersistenceProviderManager.php(27): WURFL_Xml_PersistenceProvider_PersistenceProviderManager::_initialize() #3 /var/www/drupal/modules/wurfl/lib/wurfl/WURFL/WURFLManagerProvider.php(81): WURFL_Xml_PersistenceProvider_PersistenceProviderManager::getPersiste in /var/www/drupal/modules/wurfl/lib/wurfl/WURFL/Xml/PersistenceProvider/FilePersistenceProvider.php on line 46

my wurfl-config.xml is



wurfl.xml

web_browsers_patch.xml file dir=../WURFL/Cache file dir=../WURFL/Cache

Have you a solution?

Thank you in advance

oboz’s picture

When I use for tests not a standard browsers in "User Agent Switcher" plugin for Firefox I have the same error.

For example:
Multizilla 1.6 on WindowsXP or MSIE 5.15 on Mac OS9

oboz’s picture

I solved the problem.

dir =../WURFL/Cache - not correct. We need to create a new folder. For instance "cache". I give permissions that PHP can write to this folder(eg 777).

Then write to the configuration would look like this:
dir =.. / cache
although I am write full path to it
dir =/var/www/sites/all/modules/wurfl/lib/wurfl/cache

After that it's working, although the first time will run very slowly or stop by timeout. But when the cache will be formed - all will work very quickly.

Boodaleh’s picture

Mine is slightly different:

Fatal error: Uncaught exception 'WURFL_WURFLException' with message 'The diricetory specified for the persistence provider does not exist or it is not writable ' in /var/www/sites/all/modules/wurfl/lib/wurfl/Xml/PersistenceProvider/FilePersistenceProvider.php:46 Stack trace: #0 /var/www/sites/all/modules/wurfl/lib/wurfl/Xml/PersistenceProvider/FilePersistenceProvider.php(30): WURFL_Xml_PersistenceProvider_FilePersistenceProvider->initialize(Array) #1 /var/www/sites/all/modules/wurfl/lib/wurfl/Xml/PersistenceProvider/PersistenceProviderManager.php(53): WURFL_Xml_PersistenceProvider_FilePersistenceProvider->__construct(Array) #2 /var/www/sites/all/modules/wurfl/lib/wurfl/Xml/PersistenceProvider/PersistenceProviderManager.php(31): WURFL_Xml_PersistenceProvider_Per in /var/www/sites/all/modules/wurfl/lib/wurfl/Xml/PersistenceProvider/FilePersistenceProvider.php on line 46

I applied the patch (http://drupal.org/files/issues/wurfl.patch), as suggested, then I could see the module/page, but when I run the test I got this error.
I also checked the cache folder, it's ownership and permissions a ssuggested, but still no luck

Boodaleh’s picture

Eish! Seems I didn't thoroughly check the folder permissions and ownerships.

It turned out that the owner and group of were not the same, fixed and Voi la!

twom’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.