Note that there are some explanatory texts on larger screens.

plurals
  1. POWURFL with Zend Framework ignoring cache directory configuration
    text
    copied!<p>I'm following the tutorial on setting up WURFL with Zend Framework to enable easy mobile browser detection. </p> <p><a href="http://framework.zend.com/manual/en/zend.http.user-agent.html#zend.http.user-agent.quick-start" rel="nofollow">http://framework.zend.com/manual/en/zend.http.user-agent.html#zend.http.user-agent.quick-start</a></p> <p>I have got it setup to the point where it can detect a desktop browser and give me all the details and features of that browser, but when I try to access the website using an iPhone (mobile safari) it throws an error when trying to write to the cache directory.</p> <p>Here's what I'm seeing in my error logs:</p> <pre><code>2011-06-08T22:32:34-07:00 ERR (3): The file cache directory does not exist and could not be created. Please make sure the cache directory is writeable: /var/tmp </code></pre> <p>However in my configuration at /application/configs/wurfl-config.php I have set the cache directory to the following:</p> <pre><code>&lt;?php $resourcesDir = dirname(__FILE__) . '/../../data/wurfl/'; $wurfl['main-file'] = $resourcesDir . 'wurfl-2.0.27.zip'; $wurfl['patches'] = array($resourcesDir . 'web_browsers_patch.xml'); $persistence['provider'] = 'file'; $persistence['dir'] = $resourcesDir . '/cache/'; $cache['provider'] = null; $configuration['wurfl'] = $wurfl; $configuration['persistence'] = $persistence; $configuration['cache'] = $cache; </code></pre> <p>I've also ensured it is writable by the server, but wurfl seems to think my cache directory is still /var/tmp</p> <p>How can I get wurfl to observe my cache directory setting?</p> <p><strong>Notes</strong>: The tutorial uses wurfl-1.1 as the example, I have only been able to find wurfl-1.3 on sourceforge. This may be an issue.</p> <p><strong>Notes</strong>: I have these lines in my application.ini file:</p> <pre><code>; WURFL resources.useragent.wurflapi.wurfl_api_version = "1.1" resources.useragent.wurflapi.wurfl_lib_dir = APPLICATION_PATH "/../library/wurfl-php-1.3.0/WURFL/" resources.useragent.wurflapi.wurfl_config_file = APPLICATION_PATH "/configs/wurfl-config.php" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload