Changes to php settings via GUI not applied to php.ini

Hi, thanks for your work. I am new to using hestia and ubuntu server. Prior to that, he worked with West and Cent Os.
Installed hestia a few days ago: ver 1.1.0 master branch.

bash hst-install.sh --nginx yes --phpfpm yes --apache no --multiphp yes --named no --vsftpd no --proftpd yes --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin no --clamav yes --mysql yes --postgresql no --hostname domain --email email --password passwd

Almost everything works fine. Faced that some values in php.ini are not applied. So it should be or is it a bug? I could solve the problem by creating my own templates in /usr/local/hestia/data/templates/web/php-fpm/

php_admin_value[max_input_vars] = 5000
php_admin_value[max_execution_time] = 300
php_admin_value[max_input_time] = 120
php_admin_value[post_max_size] = 2048M
php_admin_value[upload_max_filesize] = 2048M
php_admin_value[display_errors] = Off

And one more question. Can I change the master brunch without reinstalling when stable version 1.1 comes out?

How did you update php.ini ? (ssh or hestia)

Have you updated php.ini for all php versions?
check with this:

find /etc/php* -name php.ini -type f -exec grep -i 'max_input_vars' {} \+

Did you restart phpX.Y-fpm, after editing the file?

Нi, from hestia
in php.ini these values are present for all php cli versions and not for all fmp. And not applied to sites.
And yes, i restarted the phpX.Y-fpm
example: service php7.4-fpm restart.


for others, the same values (cli and fpm)

I don’t see anything wrong here, does you docroot contain any .user.ini files?

php vars could also be overridden in nginx and php-fpm :

  • /home/user/web/domain.tld/nginx.conf*
  • /etc/php/7.3/fpm/pool.d/domain.tld.conf

the point is that settings are added from the panel, but are not applied on sites. so I had to make changes to the templates. I wrote about this in the very first message

with standard socket.tpl

with my socket.tpl

; origin-src: deb/templates/web/php-fpm/socket.tpl
[%backend%]
listen = /var/run/php/%backend%.sock
listen.owner = %user%
listen.group = www-data
listen.mode = 0660
user = %user%
group = %user%
pm = ondemand
pm.max_children = 8
pm.max_requests = 4000
pm.process_idle_timeout = 10s
pm.status_path = /status
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
php_admin_value[session.save_path] = /home/%user%/tmp
php_admin_value[open_basedir] = /home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f admin@%domain%
;custom values
php_admin_value[max_input_vars] = 5000
php_admin_value[max_execution_time] = 300
php_admin_value[max_input_time] = 120
;php_admin_value[memory_limit] = 256M
php_admin_value[post_max_size] = 2048M
php_admin_value[upload_max_filesize] = 2048M
php_admin_value[display_errors] = Off
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /home/%user%/tmp
env[TMPDIR] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp

;

@sergei Can you please open another thread? This is in sime way not directly related to the upgrade itself.

Sorry. I wanted to help identify bugs before release 1.1

Nothing to excuse your self, maybe you got me wrong: This thread got a bit chaotic, so I would like that we can discuss this in another thread - we’re here to help and improve hestia :slight_smile:.

1 Like

Thanks @falzo for splitting the thread, didnt even know that this is a option with discourse :smile:.

1 Like

you’re very welcome @Raphael - that’s why you have me :wink:

back to topic, I just tried on 1.1, deb 10, nginx+apache+multiphp…
changes via GUI in the ‘simple’ interface are reflected as well as changes to the php.ini via the ‘advanced’

it seems to not really restart the service, but in the end does not need to, because fpm spawn fresh child processes anyway which read the php.ini again anyway if I am not mistaken.

1 Like

Can i say i second this what Sergei was trying to say. I had a customer wanting to upgrade “Max Input Vars” where as this is not part of the gui, it is part of the manual advanced section in the Gui. I modified the value from 1000 to 5000 which is what the client needed, but according to the dash board of wordpress and betheme the global change hadnt applied. I had to create a template and assign to it the client with the values Sergei, kindly put above. Im happy to elabrate if need be. But i had to create a bespoke template for the changes to work. And yes i did do restarts etc.