.user.ini keeps being overwritten

This has been happening to me for ages since i was on NC18 and am now on NC23, so I don’t think it’s an NC issue so much as a configuration issue.

In .user.ini there is a line:
output_buffering=0

Every once in a while, when I do an overview check, I’ll get a warning that output buffering needs to be disabled (It is in the php.ini as output_buffering = 0). Then I’ll go check the .user.ini file and it has been overwritten to:
output_buffering=‘off’

I then change it back to output_buffering=0 and all is well again. For a little while, then it changes back. I’m using Nginx so I don’t even think the .user.ini file comes into effect over what’s in the php.ini, but NC cares and it’s a little annoying. Is there a bad setting somewhere that would make NC overwrite the .user.ini file?

Happened again, 3 days after I changed output_buffering=‘off’ back to output_buffering=0

Now it’s output_buffering=‘off’ again.

Does anyone have any ideas?

Same with me.
I added:
opcache.interned_strings_buffer=10
opcache.max_accelerated_files=21000
After the update, settings are gone …
Also the memory settings that I entered in earlier releases are gone now.

I want NC settings per domain, not for all domains on my server.

Earlier this ‘overwriting’ was with the .htaccess header settings that I had set within httpd per domain.

So it seems a repeating issue that neglects custom settings.

Your issue sounds different. Any opcache settings should be a .php configuration, not a nextcloud one. In this case, I’m not trying to have a custom setting. I’m talking strictly within the nextcloud datafile .user.ini to have the default output_buffering=0. But it keeps overwriting to output_buffering=‘off’ and then complains about it…

At this point the only work around I can think of is to have cron periodically fix it for me if it is has changed, but that’s just a band aid…

Yes, you are right.
I’ve added the otions in the user config within DirectAdmin. This option is available within httpd and then click the php version.

But Nextcloud seems not to report relevant feedback. Changing to very high numbers keep generating these warnings.

But I found out that ‘memcache.local’ => ‘\OC\Memcache\APCu’, as in the documentation is no longer relevant for PHP8. That is not supported anymore. I changed APCu to redis. That seems to work.

That’s interesting. Yeah, I’ve had good things with redis.

Still happening with 23.0.3. Am I alone in seeing this?

Interesting, I’m on Gentoo and don’t have this problem. Obviously some script is overwriting your settings. I would give this file reading rights for everybody and writeable for nobody and look what error messages are popping up in the logs…

@flockmock That’s a great idea, thanks! I’ll give that a try!
@JimmyKater What information do you need?

Hi @jshpettus,
You deleted the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to help you! Thanks.

1 Like

I’ll see if I can find time to update the first post with some of the system information. But part of the issue is that there is nothing in any log. It just does it. I was hoping something would trigger with flockmock’s suggestion, but nothing popped up in any of the logs.

Anyway, I wanted to add I had to temporarily give write permission. To upgrade to
23.0.4 and in the upgrade process, as with every upgrade process before it, it goes to output_buffering=‘off’.

another idea: .user.ini files are inherited to sub-directories, so make sure that there is no .user.ini file in a parent directory, which is overwriting your settings.
Somewhat related:
https://help.nextcloud.com/t/php-configuration-option-output-buffering-must-be-disabled-nextcloud-20-0-1-ubuntu/97918

Thank you! That’s an interesting thought, but unfortunately I don’t have any other .user.ini files. Again I’m using nginx as a web-server so really .user.ini and .htaccess should have no bearing…

In the mean time, I made the file read only again, that seems to hold of changes between updates…

[EDIT]

There was an odd file in the webroot folder called .viminfo it had output_buffering=‘Off’ 4 times. given the oddity of the syntax specifically the quotations around Off, I wonder if that had something to do with it. I just changed it now, made .user.ini writable and wondering if it will change now…
[EDIT2]

That’s funny, its part of vim, I guess it created that when I accessed the folder as www-data…so i ended up deleting such unneeded files.

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