[Owncloud][config.php] Error when editing config.php file

Hello,
Just when I Edit the config.php file I have a problem in web interface:

Steps to reproduce

1.Edit /var/www/owncloud/config/config.php filevia vim editor the save and exit.
config added in the end of file:

  'memcache.local' => '\OC\Memcache\Redis',
  'redis' => [
          'host' => '/var/run/redis/redis-server.sock', // can also be a unix domain socket: '/tmp/redis.sock'
          'port' => 0,
          'password' => '', // Optional, if not defined no password will be used.
          'dbindex' => 0,   // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index. Out of the box, every Redis instance supports 16 databases so `<dbIndex>` has to be set between 0 and 15.
    ],

2.Accessing to the web owncloud from web browser
3.

Expected behaviour

Accessing without any problem

Actual behaviour

I see an error and a message on web interface:

**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.**

Server configuration

Operating system:

Web server:
Server version: Apache/2.4.52 (Ubuntu)
Database:
Server version: 10.6.11-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
PHP version:
PHP 7.4.33 (cli) (built: Nov 8 2022 11:33:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

ownCloud version: (see ownCloud admin page)

Version

[ownCloud ]10.11.0 (stable)

Developed by the [ownCloud community] is licensed under the [AGPL]
Updated from an older ownCloud or fresh install:
fresh install
Where did you install ownCloud from:
Install owncloud server from manual install on official documentation
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

root@ownclouddev:/var/www/owncloud# sudo -u www-data php occ app:list
Enabled:
  - activity:
    - Version: 2.7.1
    - Path: /var/www/owncloud/apps/activity
  - comments:
    - Version: 0.3.0
    - Path: /var/www/owncloud/apps/comments
  - configreport:
    - Version: 0.2.1
    - Path: /var/www/owncloud/apps/configreport
  - contacts:
    - Version: 1.5.5
    - Path: /var/www/owncloud/apps-external/contacts
  - dav:
    - Version: 0.7.0
    - Path: /var/www/owncloud/apps/dav
  - extract:
    - Version: 1.2.4
    - Path: /var/www/owncloud/apps-external/extract
  - federatedfilesharing:
    - Version: 0.5.0
    - Path: /var/www/owncloud/apps/federatedfilesharing
  - federation:
    - Version: 0.1.0
    - Path: /var/www/owncloud/apps/federation
  - files:
    - Version: 1.5.2
    - Path: /var/www/owncloud/apps/files
  - files_antivirus:
    - Version: 1.2.1
    - Path: /var/www/owncloud/apps-external/files_antivirus
  - files_clipboard:
    - Version: 1.0.3
    - Path: /var/www/owncloud/apps-external/files_clipboard
  - files_external:
    - Version: 0.9.0
    - Path: /var/www/owncloud/apps/files_external
  - files_mediaviewer:
    - Version: 1.0.5
    - Path: /var/www/owncloud/apps/files_mediaviewer
  - files_pdfviewer:
    - Version: 1.0.1
    - Path: /var/www/owncloud/apps/files_pdfviewer
  - files_sharing:
    - Version: 0.14.0
    - Path: /var/www/owncloud/apps/files_sharing
  - files_texteditor:
    - Version: 2.4.1
    - Path: /var/www/owncloud/apps/files_texteditor
  - files_trashbin:
    - Version: 0.9.1
    - Path: /var/www/owncloud/apps/files_trashbin
  - files_versions:
    - Version: 1.3.0
    - Path: /var/www/owncloud/apps/files_versions
  - firstrunwizard:
    - Version: 1.2.0
    - Path: /var/www/owncloud/apps/firstrunwizard
  - gallery:
    - Version: 16.1.2
    - Path: /var/www/owncloud/apps-external/gallery
  - market:
    - Version: 0.7.0
    - Path: /var/www/owncloud/apps/market
  - notifications:
    - Version: 0.5.4
    - Path: /var/www/owncloud/apps/notifications
  - onlyoffice:
    - Version: 7.6.7
    - Path: /var/www/owncloud/apps-external/onlyoffice
  - provisioning_api:
    - Version: 0.5.0
    - Path: /var/www/owncloud/apps/provisioning_api
  - systemtags:
    - Version: 0.3.0
    - Path: /var/www/owncloud/apps/systemtags
  - templateeditor:
    - Version: 0.4.0
    - Path: /var/www/owncloud/apps/templateeditor
  - updatenotification:
    - Version: 0.2.1
    - Path: /var/www/owncloud/apps/updatenotification
Disabled:
  - admin_audit:
    - Path: /var/www/owncloud/apps/admin_audit
  - announcementcenter:
    - Path: /var/www/owncloud/apps/announcementcenter
  - customgroups:
    - Path: /var/www/owncloud/apps/customgroups
  - encryption:
    - Path: /var/www/owncloud/apps/encryption
  - enterprise_key:
    - Path: /var/www/owncloud/apps/enterprise_key
  - external:
    - Path: /var/www/owncloud/apps/external
  - files_classifier:
    - Path: /var/www/owncloud/apps/files_classifier
  - files_external_dropbox:
    - Path: /var/www/owncloud/apps/files_external_dropbox
  - files_external_ftp:
    - Path: /var/www/owncloud/apps/files_external_ftp
  - files_ldap_home:
    - Path: /var/www/owncloud/apps/files_ldap_home
  - files_lifecycle:
    - Path: /var/www/owncloud/apps/files_lifecycle
  - graphapi:
    - Path: /var/www/owncloud/apps/graphapi
  - guests:
    - Path: /var/www/owncloud/apps/guests
  - metrics:
    - Path: /var/www/owncloud/apps/metrics
  - oauth2:
    - Path: /var/www/owncloud/apps/oauth2
  - openidconnect:
    - Path: /var/www/owncloud/apps/openidconnect
  - password_policy:
    - Path: /var/www/owncloud/apps/password_policy
  - sharepoint:
    - Path: /var/www/owncloud/apps/sharepoint
  - systemtags_management:
    - Path: /var/www/owncloud/apps/systemtags_management
  - theme-enterprise:
    - Path: /var/www/owncloud/apps/theme-enterprise
  - user_external:
    - Path: /var/www/owncloud/apps/user_external
  - user_ldap:
    - Path: /var/www/owncloud/apps/user_ldap
  - user_shibboleth:
    - Path: /var/www/owncloud/apps/user_shibboleth
  - web:
    - Path: /var/www/owncloud/apps/web
  - windows_network_drive:
    - Path: /var/www/owncloud/apps/windows_network_drive
  - wopi:
    - Path: /var/www/owncloud/apps/wopi
  - workflow:
    - Path: /var/www/owncloud/apps/workflow

Are you using external storage, if yes which one: /mnt/owncloud_data mounted from NFS
root@umalisownclouddev:/var/www/owncloud# ls -l | grep ^l
lrwxrwxrwx 1 root root 32 déc. 21 23:25 apps-external → /mnt/owncloud_data/apps-external
lrwxrwxrwx 1 root root 23 déc. 21 23:25 data → /mnt/owncloud_data/data

Are you using encryption: no

Are you using an external user-backend, if yes which one: NO

Browser: Chrom or Firefox

Operating system: Ubuntu 22.04.1 LTS

Logs :

no logs

192.168.56.23 - - [14/Jan/2023:16:02:29 +0100] “GET / HTTP/1.0” 500 1231 “-” "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.3


#### ownCloud log (data/owncloud.log)

{“reqId”:“Y8LDhf_l7U9mRLyBPpEQkgAAAAM”,“level”:3,“time”:“2023-01-14T16:00:21+01:00”,“remoteAddr”:“192.168.101.14”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/",“message”:“Exception: {“Exception”:“RedisException”,“Message”:“Redis server went away”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php(49): Redis->get()\n#1 \/var\/www\/owncloud\/lib\/private\/App\/AppManager.php(442): OC\\Memcache\\Redis->get()\n#2 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(862): OC\\App\\AppManager->getAppInfo()\n#3 \/var\/www\/owncloud\/lib\/private\/legacy\/util.php(1579): OC_App::shouldUpgrade()\n#4 \/var\/www\/owncloud\/lib\/private\/legacy\/util.php(727): OC_Util::needUpgrade()\n#5 \/var\/www\/owncloud\/lib\/base.php(609): OC_Util::checkServer()\n#6 \/var\/www\/owncloud\/lib\/base.php(1060): OC::init()\n#7 \/var\/www\/owncloud\/index.php(53): require_once(’\/var\/www\/ownclo…’)\n#8 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php",“Line”:49}"}
{“reqId”:“Y8LDhf_l7U9mRLyBPpEQkgAAAAM”,“level”:3,“time”:“2023-01-14T16:00:21+01:00”,“remoteAddr”:“192.168.101.14”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/",“message”:“Exception: {“Exception”:“RedisException”,“Message”:“Redis server went away”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php(49): Redis->get()\n#1 \/var\/www\/owncloud\/lib\/private\/App\/AppManager.php(442): OC\\Memcache\\Redis->get()\n#2 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(862): OC\\App\\AppManager->getAppInfo()\n#3 \/var\/www\/owncloud\/lib\/private\/legacy\/util.php(1579): OC_App::shouldUpgrade()\n#4 \/var\/www\/owncloud\/lib\/private\/legacy\/util.php(727): OC_Util::needUpgrade()\n#5 \/var\/www\/owncloud\/lib\/base.php(609): OC_Util::checkServer()\n#6 \/var\/www\/owncloud\/lib\/base.php(1060): OC::init()\n#7 \/var\/www\/owncloud\/index.php(53): require_once(’\/var\/www\/ownclo…’)\n#8 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php",“Line”:49}"}
{“reqId”:“Y8LDhf_l7U9mRLyBPpEQkgAAAAM”,“level”:3,“time”:“2023-01-14T16:00:21+01:00”,“remoteAddr”:“192.168.101.14”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/",“message”:“Exception: {“Exception”:“RedisException”,“Message”:“Redis server went away”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php(49): Redis->get()\n#1 \/var\/www\/owncloud\/lib\/private\/URLGenerator.php(164): OC\\Memcache\\Redis->get()\n#2 \/var\/www\/owncloud\/lib\/private\/legacy\/template\/functions.php(169): OC\\URLGenerator->imagePath()\n#3 \/var\/www\/owncloud\/core\/templates\/layout.guest.php(17): image_path()\n#4 \/var\/www\/owncloud\/lib\/private\/Template\/Base.php(226): include(’\/var\/www\/ownclo…’)\n#5 \/var\/www\/owncloud\/lib\/private\/Template\/Base.php(194): OC\\Template\\Base->load()\n#6 \/var\/www\/owncloud\/lib\/private\/legacy\/template.php(239): OC\\Template\\Base->fetchPage()\n#7 \/var\/www\/owncloud\/lib\/private\/legacy\/template.php(261): OC_Template->fetchPage()\n#8 \/var\/www\/owncloud\/lib\/private\/Template\/Base.php(176): OC_Template->fetchPage()\n#9 \/var\/www\/owncloud\/lib\/private\/legacy\/template.php(386): OC\\Template\\Base->printPage()\n#10 \/var\/www\/owncloud\/index.php(76): OC_Template::printExceptionErrorPage()\n#11 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php",“Line”:49}"}


#### Browser log
  1. Request URL:

fqdn

  1. Request Method:

GET

  1. Status Code:

500

  1. Remote Address:

x.x.x.x:443

  1. Referrer Policy:

strict-origin-when-cross-origin

  1. Response Headers

  2. cache-control:

no-store, no-cache, must-revalidate

  1. content-length:

289

  1. content-security-policy:

default-src ‘self’; script-src ‘self’ ‘unsafe-eval’; style-src ‘self’ ‘unsafe-inline’; frame-src *; img-src * data: blob:; font-src ‘self’ data:; media-src *; connect-src *

  1. content-type:

text/plain; charset=utf-8

  1. date:

Sat, 14 Jan 2023 15:04:30 GMT

  1. expires:

Thu, 19 Nov 1981 08:52:00 GMT

  1. pragma:

no-cache

  1. server:

nginx/1.14.0 (Ubuntu)

  1. set-cookie:

oc_sessionPassphrase=FiGHmUujur3XXZVYrHSUGclcL5QGFyRW42wO7G%2BLlv2OhVL7I2y%2BqH5GGjDRJg4rJEm19ru4%2FPfyjtguC7F%2BoYc%2FPtuH%2BNBdWqisvQG9SjdH40a%2FjNBy4z41evH7RbtS; expires=Sat, 14-Jan-2023 15:24:30 GMT; Max-Age=1200; path=/; secure; HttpOnly; SameSite=Strict

  1. x-content-type-options:

nosniff

  1. x-download-options:

noopen

  1. x-frame-options:

SAMEORIGIN

  1. x-permitted-cross-domain-policies:

none

  1. x-robots-tag:

none

  1. x-xss-protection:

0

  1. Request Headers

  2. :authority:

fqdn

  1. :method:

GET

  1. :path:

/

  1. :scheme:

https

  1. accept:

text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9

  1. accept-encoding:

gzip, deflate, br

  1. accept-language:

en-US,en;q=0.9,ar;q=0.8,fr;q=0.7

  1. cache-control:

max-age=0

  1. cookie:

oc_sessionPassphrase=FiGHmUujur3XXZVYrHSUGclcL5QGFyRW42wO7G%2BLlv2OhVL7I2y%2BqH5GGjDRJg4rJEm19ru4%2FPfyjtguC7F%2BoYc%2FPtuH%2BNBdWqisvQG9SjdH40a%2FjNBy4z41evH7RbtS; ocbmt8jhmtws=etecds0u5p5h5peq7ia162arot

  1. sec-ch-ua:

“Not?A_Brand”;v=“8”, “Chromium”;v=“108”, “Google Chrome”;v=“108”

  1. sec-ch-ua-mobile:

?0

  1. sec-ch-ua-platform:

“Windows”

  1. sec-fetch-dest:

document

  1. sec-fetch-mode:

navigate

  1. sec-fetch-site:

none

  1. sec-fetch-user:

?1

  1. upgrade-insecure-requests:

1

  1. user-agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Check the connection with redis. You might need to connect through ip address.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.