Answers.Body: <p>Solved. The client was using something called Samba Share on their server and that didn't work well with permissions. They changed servers and it was solved.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-05T12:27:11.323Z
Answers.LastActivityDate: 2016-01-05T12:27:11.323Z
Answers.UserDisplayName: Tom De Smet
Body: <p>What can the issue be here? I have no clue.</p>
  
  <p>Config settings are like this:</p>
  
  <pre><code>'cacheMethod'           =&gt; "db",
  'cacheDuration'         =&gt; 'P2M', /*2 months*/
  </code></pre>
  
  <p><strong>Undefined property: Craft\WebApp::$db</strong></p>
  
  <pre><code>/var/www/www_cmgg_cmgg_be/craft/app/services/CacheService.php(46)
  
  34         switch (craft()-&gt;config-&gt;get('cacheMethod'))
  35         {
  36             case CacheMethod::APC:
  37             {
  38                 $this-&gt;_cacheComponent = new ApcCache();
  39                 break;
  40             }
  41 
  42             case CacheMethod::Db:
  43             {
  44                 $this-&gt;_cacheComponent = new DbCache();
  45                 $this-&gt;_cacheComponent-&gt;gCProbability = craft()-&gt;config-&gt;get('gcProbability', ConfigFile::DbCache);
  46                 $this-&gt;_cacheComponent-&gt;cacheTableName = craft()-&gt;db-&gt;getNormalizedTablePrefix().craft()-&gt;config-&gt;get('cacheTableName', ConfigFile::DbCache);
  47                 $this-&gt;_cacheComponent-&gt;autoCreateCacheTable = true;
  48                 break;
  49             }
  50 
  51             case CacheMethod::EAccelerator:
  52             {
  53                 $this-&gt;_cacheComponent = new EAcceleratorCache();
  54                 break;
  55             }
  56 
  57             case CacheMethod::File:
  58             {
  </code></pre>
  
Tags: <cache><error-message>
Title: Undefined property when using cacheMethod = db
ThreadText: # Undefined property when using cacheMethod = db
  
  (Asked by: username_0 on 2016-01-05)
  
  What can the issue be here? I have no clue.
  
  Config settings are like this:
  
  ```
  'cacheMethod'           => "db",
  'cacheDuration'         => 'P2M', /*2 months*/
  
  ```
  
  **Undefined property: Craft\WebApp::$db**
  
  ```
  /var/www/www_cmgg_cmgg_be/craft/app/services/CacheService.php(46)
  
  34         switch (craft()->config->get('cacheMethod'))
  35         {
  36             case CacheMethod::APC:
  37             {
  38                 $this->_cacheComponent = new ApcCache();
  39                 break;
  40             }
  41 
  42             case CacheMethod::Db:
  43             {
  44                 $this->_cacheComponent = new DbCache();
  45                 $this->_cacheComponent->gCProbability = craft()->config->get('gcProbability', ConfigFile::DbCache);
  46                 $this->_cacheComponent->cacheTableName = craft()->db->getNormalizedTablePrefix().craft()->config->get('cacheTableName', ConfigFile::DbCache);
  47                 $this->_cacheComponent->autoCreateCacheTable = true;
  48                 break;
  49             }
  50 
  51             case CacheMethod::EAccelerator:
  52             {
  53                 $this->_cacheComponent = new EAcceleratorCache();
  54                 break;
  55             }
  56 
  57             case CacheMethod::File:
  58             {
  
  ```
  
  **Tags:** cache, error-message
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-01-05. Score: 1 | Accepted answer
  
  Solved. The client was using something called Samba Share on their server and that didn't work well with permissions. They changed servers and it was solved.
  
  
  ---
  
  