# \[Solved\] Internal server error, memcache not configured

**URL:** <https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255>\
**Category:** ℹ️ Support\
**Created:** [October 3, 2018, 1:41pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255 "2018-10-03T13:41:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 3, 2018, 1:41pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/1 "2018-10-03T13:41:14Z")

</div>

**New Nextcloud installation (errors after setting up and installing apps)**  
**Operating system and version: Linux RaspberryPi 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l GNU/Linux**  
**Apache version: 2.4.25**  
**PHP version: 7.0.30**

The data of my cloud is stored on an external hard drive with the path ‘/data/Mediacenter’.

When I call Nextcloud in the browser, the following error occurs:

```auto
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

```

 ![grafik](https://help.nextcloud.com/uploads/default/original/2X/3/365505ec9e291d691d0142af6eb7d99234ab2e14.png)

The output of the Nextcloud log in `/var/www/html/nextcloud/data`:

```auto
{"reqId":"HGGIBdCKerwwr2wpwDnO","level":3,"time":"2018-10-03T07:40:49+00:00","remoteAddr":"192.168.0.61","user":"--","app":"PHP","method":"POST","url":"\/nextcloud\/index.php","message":"mkdir(): Permission denied at \/var\/www\/html\/nextcloud\/lib\/private\/Setup.php#300","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko\/20100101 Firefox\/62.0","version":""}
{"reqId":"7gxMt2jLh6d832NcgRej","level":3,"time":"2018-10-03T07:41:59+00:00","remoteAddr":"192.168.0.61","user":"--","app":"PHP","method":"POST","url":"\/nextcloud\/index.php","message":"mkdir(): Permission denied at \/var\/www\/html\/nextcloud\/lib\/private\/Setup.php#300","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko\/20100101 Firefox\/62.0","version":""}

```

I have already executed the following commands several times:

```auto
chown -R www-data:www-data /var/www/html/nextcloud/
chmod -R 777 /var/www/html/nextcloud/

```

---

<div class="post-metadata">

**Author:** ![MichaIng](https://help.nextcloud.com/user_avatar/help.nextcloud.com/michaing/32/2125_2.png) [@MichaIng](https://help.nextcloud.com/u/MichaIng)\
**Post date:** [October 3, 2018, 5:44pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/2 "2018-10-03T17:44:31Z")

</div>

Perhaps it’s about the permissions on /data/Mediacenter. Is the external hard drive owned by www-data as well?

Check via:

```
ls -al /data/Mediacenter/
ls -al /var/www/html/nextcloud/
```

---

<div class="post-metadata">

**Author:** ![forzajappie](https://help.nextcloud.com/letter_avatar/forzajappie/32/5_5575768a8748004e209b776fc1b2916d.png) [@forzajappie](https://help.nextcloud.com/u/forzajappie)\
**Post date:** [October 3, 2018, 5:45pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/3 "2018-10-03T17:45:08Z")

</div>

I had some kind of the same issue, commenting “memcache” in my config.php did the trick.

And please change the title of your topic to match your problem.

see also here, as you have PHP 7 installed as well

> [@PHP7 killed the NC13](https://help.nextcloud.com/t/php7-killed-the-nc13/29475):
>
> Hello, in order to use an app that requested a move from PHP 5,6 to PHP 7, I did the ugrade on the server that runs perfectly a NC13. But after the PHP upgrade to PHP 70, I have no acces to the NC server… The NC server just gives an error : Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details …

---

<div class="post-metadata">

**Author:** ![MichaIng](https://help.nextcloud.com/user_avatar/help.nextcloud.com/michaing/32/2125_2.png) [@MichaIng](https://help.nextcloud.com/u/MichaIng)\
**Post date:** [October 3, 2018, 5:49pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/4 "2018-10-03T17:49:22Z")

</div>

Internal server error can occur, if memcache is not configured properly. But better solution is to fix the memcache (e.g. missing PHP module) than disabling it.

But the Nextcloud log error fits to OT title, so fix that first before fixing something else based on a guess 😉.

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 3, 2018, 6:15pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/5 "2018-10-03T18:15:47Z")

</div>

Thanks a lot for all answers. How can i fix the problem with the memcache?

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 3, 2018, 6:30pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/6 "2018-10-03T18:30:35Z")

</div>

Do you have a link to the documentation? Or a keyword for Google? I tried to find a solution but I had no luck.

---

<div class="post-metadata">

**Author:** ![forzajappie](https://help.nextcloud.com/letter_avatar/forzajappie/32/5_5575768a8748004e209b776fc1b2916d.png) [@forzajappie](https://help.nextcloud.com/u/forzajappie)\
**Post date:** [October 3, 2018, 8:04pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/7 "2018-10-03T20:04:21Z")

</div>

You can find the config.php file in this directory:  
/var/www/nextcloud/config/

---

<div class="post-metadata">

**Author:** ![wjwieland](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wjwieland/32/11159_2.png) [@wjwieland](https://help.nextcloud.com/u/wjwieland)\
**Post date:** [October 4, 2018, 12:06am UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/8 "2018-10-04T00:06:27Z")

</div>

I have used the following to address the caching issues on Nexcloud. It does a pretty good job of stepping one through properly setting up caching. While I do not run NC on an RPi, I do run other services (openvpn, web server, etc…) on an RPi. I have found that the RPi is real;y not much different than any other flavor of \*nix regarding applications, so I am fairly confident that if you follow along the guide at the link below, you will find that it leads you to a solution. Hope this is helpful…

[https://docs.nextcloud.com/server/14/admin\_manual/configuration\_server/caching\_configuration.html](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/caching_configuration.html)

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 4, 2018, 7:55pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/10 "2018-10-04T19:55:43Z")

</div>

I used

```auto
apt-get install php7.0-apcu

```

to install APCu, then i restarted my Raspberry Pi and added

```auto
'memcache.local' =&gt; '\OC\Memcache\APCu',

```

to the config.php, but nothing changed. I also tried

```auto
OC\Memcache

```

and

```auto
OCP\IMemcache

```

because in /var/www/html/nextcloud/lib/private/Memcache/APCu.php in some of the first lines is the following part:  
 ![grafik](https://help.nextcloud.com/uploads/default/original/2X/2/22a792165ec8c108a6c18f8661ea2a8e31e68842.png)  
Does someone have an idea what I have to change?

---

<div class="post-metadata">

**Author:** ![Starfish](https://help.nextcloud.com/letter_avatar/starfish/32/5_5575768a8748004e209b776fc1b2916d.png) [@Starfish](https://help.nextcloud.com/u/Starfish)\
**Post date:** [October 5, 2018, 6:13am UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/11 "2018-10-05T06:13:57Z")

</div>

> [@PlutoHD](#):
>
> ‘memcache.local’ =&gt; ‘\OC\Memcache\APCu’,

Is this exactly how it is in your config, or does this site reformat that? It should be:

```auto
'memcache.local' => '\\OC\\Memcache\\APCu',

```

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 5, 2018, 7:49am UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/12 "2018-10-05T07:49:25Z")

</div>

I tried exactly what I wrote, only at the place of & g t ; was a \>  
It was without two backslashs, just one.

---

<div class="post-metadata">

**Author:** ![Starfish](https://help.nextcloud.com/letter_avatar/starfish/32/5_5575768a8748004e209b776fc1b2916d.png) [@Starfish](https://help.nextcloud.com/u/Starfish)\
**Post date:** [October 5, 2018, 8:07am UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/13 "2018-10-05T08:07:11Z")

</div>

OK, that is my config parameter, and it works, so maybe try that?

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 5, 2018, 12:53pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/14 "2018-10-05T12:53:12Z")

</div>

![grafik](https://help.nextcloud.com/uploads/default/original/2X/4/41ba27922257cc60752550769d640c7359dcdfcb.png)  
That’s in my config.php file now. I still get

```auto
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

```

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 5, 2018, 12:54pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/15 "2018-10-05T12:54:11Z")

</div>

![grafik](https://help.nextcloud.com/uploads/default/original/2X/2/2d7e93242338c656dc257ef6d02db89232cfe516.png)

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 5, 2018, 12:56pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/16 "2018-10-05T12:56:00Z")

</div>

![grafik](https://help.nextcloud.com/uploads/default/original/2X/7/77bb31a8492898f8d2435a31d140bc625f0901f4.png)

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 5, 2018, 12:57pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/17 "2018-10-05T12:57:19Z")

</div>

I used the command

```auto
apt-get install php7.0-apcu

```

from [https://guides.wp-bullet.com/install-apcu-object-cache-for-php7-for-wordpress-ubuntu-16-04/](https://guides.wp-bullet.com/install-apcu-object-cache-for-php7-for-wordpress-ubuntu-16-04/)

---

<div class="post-metadata">

**Author:** ![PlutoHD](https://help.nextcloud.com/letter_avatar/plutohd/32/5_5575768a8748004e209b776fc1b2916d.png) [@PlutoHD](https://help.nextcloud.com/u/PlutoHD)\
**Post date:** [October 6, 2018, 9:51am UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/18 "2018-10-06T09:51:11Z")

</div>

I think I did a mistake while setting up the Memcache. Can someone give me a step by step tutorial for that?

---

<div class="post-metadata">

**Author:** ![rakuraku](https://help.nextcloud.com/letter_avatar/rakuraku/32/5_5575768a8748004e209b776fc1b2916d.png) [@rakuraku](https://help.nextcloud.com/u/rakuraku)\
**Post date:** [August 7, 2019, 2:57am UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/19 "2019-08-07T02:57:58Z")

</div>

Same problem here, got internal error once I added `'memcache.local' => '\OC\Memcache\APCu',` to `config.php` . And I had tried installing `php-apcu`, still no luck.

using Redis for local caching cuases internal error, too.

---

<div class="post-metadata">

**Author:** ![IsmaelSouza](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ismaelsouza/32/20459_2.png) [@IsmaelSouza](https://help.nextcloud.com/u/IsmaelSouza)\
**Post date:** [January 18, 2020, 1:49pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/20 "2020-01-18T13:49:39Z")

</div>

hello guys, I solved the problem … by the official documentation.  
the error is within the path “/var/www/html/nextcloud/config/config.php” for some reason it does not work with the parameters passed in some tutorials, so do as follows.

 ![Screenshot_2](https://help.nextcloud.com/uploads/default/original/3X/1/0/104f82b87c4199a85d30ff84bf272e16b83b30d9.png)

at the end of the configuration, depending on whether it will be a large or small company install the following “apt install php7.3-redis”  
it will depend on the version of php you are using. this was all resolved using the official documentation, so all rights to the official documentation only this installation (apt install php7.3-redis) resolved. hugs, hope to help.

---

<div class="post-metadata">

**Author:** ![Plex\_Mat](https://help.nextcloud.com/user_avatar/help.nextcloud.com/plex_mat/32/22702_2.png) [@Plex\_Mat](https://help.nextcloud.com/u/Plex_Mat)\
**Post date:** [July 18, 2020, 3:18pm UTC](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255/21 "2020-07-18T15:18:10Z")

</div>

I know it’s solved. But I got the error message, too - since 2 hours ! suddenly.

And I don’t know, I never configured memcache. The official Docu has something to tell about this:  
**A memcache is not required and you may safely ignore the warning if you prefer.**

Why you guys bind the error message to something, which is actually not necessary due to the nextcloud programmers ? Can it be, that configuring the memcache removes the symptom and not the cause !?

Why does this error message appear in the 1st place if having a memcache is not required !! ?!!!

[Next page](https://help.nextcloud.com/t/solved-internal-server-error-memcache-not-configured/38255.md?page=2)
