<p>This issue turned out to be caused by a config setting that had been added to <code>general.php</code></p>

<pre><code>'cacheMethod' =&gt; 'apc'
</code></pre>

<p>The server had APC installed but my local environment did not.  There were a couple options to fix this:</p>

<ol>
<li>Install <a href="http://php.net/manual/en/book.apc.php" rel="nofollow">Alternative PHP Cache</a> (APC)</li>
<li>Setup a multi-environment config and override the <code>cacheMethod</code> setting with another method that is supported in your local environment, such as <code>'cacheMethod' =&gt; 'file'</code></li>
<li>Remove this line as it may not be needed anyway. <code>apc</code> is PHP byte caching and if your running PHP 5.5, that's enabled by default and <code>apc</code> is unnecessary</li>
</ol>

CC BY-SA 3.0
2014-08-22T19:03:30.373Z
2014-08-22T19:03:30.373Z
Ben Parizek
<p>I had the same issue. But I was using memcache.</p>

<p>It turns out it was acually memcached which is a slightly different extension. </p>

<p>Enable the setting in the memcache.php config file with </p>

<pre><code>'useMemcached' =&gt; true,
</code></pre>

CC BY-SA 3.0
2015-02-04T01:00:48.050Z
2015-02-04T01:00:48.050Z
jackmcpickle
<p>What could cause Craft to not define the request object?</p>

<p>I have a local site that recently stopped loading (front-end and back-end)</p>

<p>The error is happening in WebApp.php (line 630) when <code>$this-&gt;request-&gt;getBrowserLanguages()</code> method runs.  The script fails because <code>$this-&gt;request</code> is not defined.</p>

<p>Other Craft installations work just fine.  This site works just fine on a dev and live server with the same code. Any ideas on what I bumped?</p>

CC BY-SA 3.0
2014-08-21T22:13:34.060Z
Can you share the full stack trace leading up to the error?
Brad Bell
CC BY-SA 3.0
2014-08-21T23:06:05.780Z
Just sent you an email with it (didn't want to post the path info here)
Ben Parizek
CC BY-SA 3.0
2014-08-22T00:24:16.720Z
It looks like this has been caused by a new line that was added in the general.php 'cacheMethod' => 'apc'.  I'm guessing I don't have this installed locally.  Still looking into this and will update when confirmed.
Ben Parizek
<error-message><request>
Undefined property: Craft\WebApp::$request
# Undefined property: Craft\WebApp::$request

(Asked by: username_0 on 2014-08-21)

What could cause Craft to not define the request object?

I have a local site that recently stopped loading (front-end and back-end)

The error is happening in WebApp.php (line 630) when `$this->request->getBrowserLanguages()` method runs. The script fails because `$this->request` is not defined.

Other Craft installations work just fine. This site works just fine on a dev and live server with the same code. Any ideas on what I bumped?

**Tags:** error-message, request
> **Comments:**
> **username_1**: Can you share the full stack trace leading up to the error?  
> **username_0**: Just sent you an email with it (didn't want to post the path info here)  
> **username_0**: It looks like this has been caused by a new line that was added in the general.php 'cacheMethod' => 'apc'.  I'm guessing I don't have this installed locally.  Still looking into this and will update when confirmed.  

---

## 2 answers

### Answer by username_0 on 2014-08-22. Score: 2 | Accepted answer

This issue turned out to be caused by a config setting that had been added to general.php
'cacheMethod' => 'apc'

The server had APC installed but my local environment did not.  There were a couple options to fix this:

Install Alternative PHP Cache (APC)
Setup a multi-environment config and override the cacheMethod setting with another method that is supported in your local environment, such as 'cacheMethod' => 'file'
Remove this line as it may not be needed anyway. apc is PHP byte caching and if your running PHP 5.5, that's enabled by default and apc is unnecessary


---

### Answer by username_2 on 2015-02-04. Score: 2

I had the same issue. But I was using memcache.
It turns out it was acually memcached which is a slightly different extension. 
Enable the setting in the memcache.php config file with 
'useMemcached' => true,


---

