[Solved] Internal server error, memcache not configured

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:

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.

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

{"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:

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

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/

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

1 Like

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 :wink:.

1 Like

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

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

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

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

I used

apt-get install php7.0-apcu

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

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

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

OC\Memcache

and

OCP\IMemcache

because in /var/www/html/nextcloud/lib/private/Memcache/APCu.php in some of the first lines is the following part:
grafik
Does someone have an idea what I have to change?

1 Like

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

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

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

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

grafik
That’s in my config.php file now. I still get

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

I used the command

apt-get install php7.0-apcu

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

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

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.

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.

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.

1 Like

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 !! ?!!!