# PHP Fatal error: Uncaught exception 'CacheException'

**URL:** <https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165>\
**Category:** Need Help\
**Created:** [February 26, 2017, 11:08am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165 "2017-02-26T11:08:02Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpb](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rpb](https://discourse.cakephp.org/u/rpb)\
**Post date:** [February 26, 2017, 11:08am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/1 "2017-02-26T11:08:03Z")

</div>

Help:  
PHP Fatal error: Uncaught exception ‘CacheException’ with message ‘Cache engine “default” is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct’ in /var/www/html/top/lib/Cake/Cache/Cache.php:186\nStack trace:\n#0 /var/www/html/top/lib/Cake/Cache/Cache.php(151): Cache::\_buildEngine(‘default’)\n#1 /var/www/html/top/app/Config/core.php(351): Cache::config(‘default’, Array)\n#2 /var/www/html/top/lib/Cake/Core/Configure.php(72): include(’/var/www/html/t…’)\n#3 /var/www/html/top/lib/Cake/bootstrap.php(431): Configure::bootstrap(true)\n#4 /var/www/html/top/app/webroot/index.php(90): include(’/var/www/html/t…’)\n#5 {main}\n thrown in /var/www/html/top/lib/Cake/Cache/Cache.php on line 186

I can not solve!

---

<div class="post-metadata">

**Author:** ![shubhrajyoti](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/shubhrajyoti/32/544_2.png) [@shubhrajyoti](https://discourse.cakephp.org/u/shubhrajyoti)\
**Post date:** [February 27, 2017, 11:40am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/2 "2017-02-27T11:40:04Z")

</div>

set the permission of your project folder,  
if you are using ubuntu then to go project folder and run the command “chmod 777 -R ProjectName”

---

<div class="post-metadata">

**Author:** ![rpb](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rpb](https://discourse.cakephp.org/u/rpb)\
**Post date:** [February 28, 2017, 6:41am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/3 "2017-02-28T06:41:00Z")

</div>

Hello, I have already performed this procedure and deactivated SElinux. However, the problem remains. I use Ubuntu 16.04

---

<div class="post-metadata">

**Author:** ![Neon1024](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/neon1024/32/67_2.png) [@Neon1024](https://discourse.cakephp.org/u/Neon1024)\
**Post date:** [February 28, 2017, 10:52am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/4 "2017-02-28T10:52:37Z")

</div>

This is not secure. You’re allowing anyone read, write and execute permissions to your entire project folder, which is superbly dangerous.

---

<div class="post-metadata">

**Author:** ![shubhrajyoti](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/shubhrajyoti/32/544_2.png) [@shubhrajyoti](https://discourse.cakephp.org/u/shubhrajyoti)\
**Post date:** [February 28, 2017, 11:52am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/5 "2017-02-28T11:52:39Z")

</div>

You are right that’s why only tmp & logs folder we have to give the 777 permission. This will solve the problem i think so. 🙂

---

<div class="post-metadata">

**Author:** ![Neon1024](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/neon1024/32/67_2.png) [@Neon1024](https://discourse.cakephp.org/u/Neon1024)\
**Post date:** [February 28, 2017, 4:08pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/6 "2017-02-28T16:08:36Z")

</div>

I would even say that you only need 775 on your `tmp` and `logs` folders, as you’ll never need to execute stuff in there.

---

<div class="post-metadata">

**Author:** ![rpb](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rpb](https://discourse.cakephp.org/u/rpb)\
**Post date:** [February 28, 2017, 11:54pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/7 "2017-02-28T23:54:00Z")

</div>

The error persists, I tried to change the permissions and I did not succeed. I use the older version of the cake. Can the problem be on the server?

---

<div class="post-metadata">

**Author:** ![rpb](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rpb](https://discourse.cakephp.org/u/rpb)\
**Post date:** [March 3, 2017, 12:41pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/8 "2017-03-03T12:41:44Z")

</div>

The error persists, I tried to change the permissions and I did not succeed. I use the older version of the cake. Can the problem be on the server?

---

<div class="post-metadata">

**Author:** ![suraj](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@suraj](https://discourse.cakephp.org/u/suraj)\
**Post date:** [April 5, 2017, 3:16pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/9 "2017-04-05T15:16:20Z")

</div>

Hi @rpb did you find a solution to your problem? I am having the same issue, i have tried changing permissions, owners checked folders but cannot get this error to go away.

---

<div class="post-metadata">

**Author:** ![rpb](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rpb](https://discourse.cakephp.org/u/rpb)\
**Post date:** [April 5, 2017, 5:26pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/10 "2017-04-05T17:26:42Z")

</div>

Hi my friend, I don’t found a solution the problem. I need help too.

---

<div class="post-metadata">

**Author:** ![suraj](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@suraj](https://discourse.cakephp.org/u/suraj)\
**Post date:** [April 5, 2017, 7:43pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/11 "2017-04-05T19:43:02Z")

</div>

Hi @rpb i had to disable SELINUX and that fixed my problem and i don’t get the error anymore. The link below describes how to disable SELINUX  
[https://www.centos.org/docs/5/html/5.1/Deployment\_Guide/sec-sel-enable-disable.html](https://www.centos.org/docs/5/html/5.1/Deployment_Guide/sec-sel-enable-disable.html)  
I hope this solves your problem too.

---

<div class="post-metadata">

**Author:** ![rpb](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rpb](https://discourse.cakephp.org/u/rpb)\
**Post date:** [April 13, 2017, 4:19am UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/12 "2017-04-13T04:19:11Z")

</div>

Hi! My problem persists. I do not know to do. Could somebody help me?

---

<div class="post-metadata">

**Author:** ![Vradhit](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@Vradhit](https://discourse.cakephp.org/u/Vradhit)\
**Post date:** [December 20, 2018, 2:34pm UTC](https://discourse.cakephp.org/t/php-fatal-error-uncaught-exception-cacheexception/2165/13 "2018-12-20T14:34:57Z")

</div>

Hi can you please tell me how to set permissions in. Windows for this error
