Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.php should preserve comments #32070

Closed
samuraiii opened this issue Jul 17, 2018 · 3 comments
Closed

config.php should preserve comments #32070

samuraiii opened this issue Jul 17, 2018 · 3 comments

Comments

@samuraiii
Copy link

Steps to reproduce

1.install owncloud 10.0.8
2.edit config.php (add comments on the end of line '//commnet'
3.visit site

Expected behaviour

ALL commnetrs should be preserved otherwise config php is unmanagable with any orchestartor like puppet.

Actual behaviour

Comments get strripped

Server configuration

Operating system:
Gentoo
Web server:
Apache 2.4
Database:
Postgresql 9.6
PHP version:
php fpm 7.1
ownCloud version: (see ownCloud admin page)
10.0.8
Updated from an older ownCloud or fresh install:
from older
Where did you install ownCloud from:
gentoo repository
Signing status (ownCloud 9.0 and above):
https://gist.github.com/samuraiii/e8417ace6036eb61fc5debeee51a892a

The content of config/config.php:
https://gist.github.com/samuraiii/1f8f842f291bfd132651f596ca99cbdc

List of activated apps:
Enabled:

  • activity: 2.3.7
  • calendar: 1.5.7
  • checksum: 0.3.5
  • comments: 0.3.0
  • configreport: 0.1.1
  • contacts: 1.5.4
  • dav: 0.3.2
  • external: 1.2
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_antivirus: 0.12.0
  • files_external: 0.7.1
  • files_pdfviewer: 0.8.2
  • files_sharing: 0.10.1
  • files_texteditor: 2.2.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.1.0
  • html5_videoplayer: 1.0
  • impersonate: 0.2.0
  • market: 0.2.4
  • notifications: 0.3.3
  • passwordpolicy: 1.1
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • tasks: 0.9.6
  • templateeditor: 0.3
  • transmission: 0.2
  • twofactor_totp: 0.4.4
  • updatenotification: 0.2.1
    Disabled:
  • encryption
  • files_trashbin
  • gpxpod

Are you using external storage, if yes which one:
local
Are you using encryption:
no

@samuraiii samuraiii changed the title config.php shuld preserve comments config.php should preserve comments Jul 17, 2018
@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #12785 (config.php is reset), #17000 (config.php refers to mssql as a supported db), #31156 (config.sample.php user.search_min_length), #31160 (config.sample.php user.search_min_length), and #7544 (config.php loses key-value-pairs).

@PVince81
Copy link
Contributor

The config.php gets rewritten by ownCloud for various reasons, some being that an admin and apps can change settings there. I'm not sure if there's an easy way for PHP to parse the config and somehow keep the comments. Would require a different parse and approach.

In the future we intend to consider different formats, maybe even move it to the database: #11843

In the meantime I'd recommend setting the config to read-only https://github.com/owncloud/core/blob/v10.0.9/config/config.sample.php#L602 so ownCloud will not overwrite the file.

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants