Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: Arnaud on February 18, 2018, 03:18:06 PM
-
Hello,
I have installed Nextcloud into an ibay according to the wiki https://wiki.contribs.org/OwnCloud (https://wiki.contribs.org/OwnCloud)
I have enabled php7.0 for this ibay by https://wiki.contribs.org/PHP_Software_Collections (https://wiki.contribs.org/PHP_Software_Collections)
From its administrative panel, Nextcloud asks for configuring OPCache by putting following into php.ini:
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
The questions is: which file should be modified to do it?
What I tried:
- As php7.0 is enabled by php-scl, I think that the conf file isn't /etc/php.ini but /etc/opt/remi/php70/php.ini . Is this right?
- If I'm right, the conf of this file is given by the templates present into /etc/e-smith/templates/opt/remi/php70/root/etc/php.ini .
- Therefore I created the template-custom /etc/e-smith/templates-custom/opt/remi/php70/root/etc/php.ini/100OPCache_nextcloud and I entered the parameter of opcache given by nextcloud into it.
- After reconfiguring the server, /etc/opt/remi/php70/php.ini contains
[PHP]
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
at its beginning.
Unfortunately, Nextcloud asks further for the configuration of OP Cache => it seems not to be the right way :?
How to do this in a working way?
Regards
Arnaud
-
Assuming you are using smeserver-php-scl
You need to adjust the php.ini here:
/opt/remi/php70/root/etc/php.ini
So your template fragment needs to be in:
/etc/e-smith/templates-custom/opt/remi/php70/root/etc/php.ini
I have added a section on the wiki.
https://wiki.contribs.org/PHP_Software_Collections#Custom_Templates
-
Hi John,
You need to adjust the php.ini here: /opt/remi/php70/root/etc/php.ini
Are you sure?
I don't have any /etc folder in this directory:
# ls /opt/remi/php70/root/
bin boot dev home lib lib64 media mnt opt proc root sbin selinux srv sys tmp usr
but I found another php.ini into /etc/opt/remi/php70 (note that the parameters for opcache are at its beginning)
# cat /etc/opt/remi/php70/php.ini
;------------------------------------------------------------
; DO NOT MODIFY THIS FILE! It is updated automatically by the
; SME Server software. Instead, modify the source template in
; an /etc/e-smith/templates-custom directory. For more
; information, see http://www.e-smith.org/custom/
;
; copyright (C) 2002 Mitel Networks Corporation
;------------------------------------------------------------
[PHP]
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
engine = On
short_open_tag = On;
asp_tags = Off
precision = 14
y2k_compliance = Off
output_buffering = Off
...........
So your template fragment needs to be in:
/etc/e-smith/templates-custom/opt/remi/php70/root/etc/php.ini
This is the place I put it too, but of course, if this folder doesn't fit with the place of the conf file......
In the other way, I wonder that the file php.ini placed into /etc/opt/remi/php70 got the parameters set by the template => I'm going to modify the template to get confirmation of this.
I have added a section on the wiki.
Thanks :)
Bye
Arnaud
-
I confirm:
putting template fragments into the folder /etc/e-smith/templates-custom/opt/remi/php70/root/etc/php.ini/ make them appear into /etc/opt/remi/php70/php.ini after the reconfiguration of the server!
Very strange... :???:
-
Arnaud
Very strange... :???:
Not strange at all.
That is how Koozali SME server works by design, refer
https://wiki.contribs.org/Template_Tutorial
You have been around long enough to know that by now, surely !
-
Hint: search for template.metadata
another out of this world example is /etc/smb.conf which expand to /etc/samba/smb.conf
the reasoning for php70 is that previous versions of the scl used to keep the file in /opt rather than in /etc/opt.
It was easier to keep the template path consistant between versions and to use a template metadata to point the right path.
-
You have been around long enough to know that by now, surely !
I thought it too..... :-? It is the first time that I'm aware that the paths could be different.... :shock:
Thanks for the hint JPP. It is exactly the chapter that I didn't read, certainly because I hadn't understood that it could be important for me.....Learning every day is nice...
So thinks looks better: I have the right conf file and the right path for the template. I must now find out why nextcloud claims further for OPcache.
Bye
Arnaud
-
Check the values with phpinfo from the ibay.
-
very good idea!
A lot of information (too much for me) and in my case the parameters of opcache (into "Zend OPcache") and the path of the corresponding conf file: /etc/opt/remi/php70/php.d/10-opcache.ini
This file seems not being generated by a template (none found + the direct modifications of the file resist a "signal-event post-upgrade; signal-event reboot"), so I simply entered the parameters wished by nextcloud and it has become happy. :grin:
Is it the right way to proceed? If "yes" this could/should be added (by me) into the Wiki, or not?
Bye Arnaud