Discover Centmin Mod today
Register Now

PHP-FPM Permanent changes to php-fpm

Discussion in 'Centmin Mod Insights' started by upgrade81, Apr 12, 2018.

  1. upgrade81

    upgrade81 Premium Member Premium Member

    130
    6
    18
    Sep 5, 2016
    Italy
    Ratings:
    +8
    Local Time:
    3:42 PM
    1.13.8
    10
    Hi guys, how do I keep the changes to the php-fpm.conf permanent?

    pm = ondemand
    pm.max_children = 16
    ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
    pm.start_servers = 8
    pm.min_spare_servers = 4
    pm.max_spare_servers = 12
    pm.max_requests = 1000

    Do I create a /etc/centminmod/php.d/B_customphp.ini?
     
  2. eva2000

    eva2000 Administrator Staff Member

    35,076
    7,742
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,941
    Local Time:
    11:42 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    when you change php-fpm.conf setttings on centmin.sh menu option 5 upgrades of php, you will be prompted if you want to overwrite php-fpm.conf. Just answer no :)
     
  3. upgrade81

    upgrade81 Premium Member Premium Member

    130
    6
    18
    Sep 5, 2016
    Italy
    Ratings:
    +8
    Local Time:
    3:42 PM
    1.13.8
    10
    Hi @eva2000 , yes, I saw that one.

    But if I wanted to do it this way is it possible?
     
  4. eva2000

    eva2000 Administrator Staff Member

    35,076
    7,742
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,941
    Local Time:
    11:42 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  5. upgrade81

    upgrade81 Premium Member Premium Member

    130
    6
    18
    Sep 5, 2016
    Italy
    Ratings:
    +8
    Local Time:
    3:42 PM
    1.13.8
    10
    at least this can be inserted?
    date.timezone = Europe / Rome
     
  6. eva2000

    eva2000 Administrator Staff Member

    35,076
    7,742
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,941
    Local Time:
    11:42 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Correction almost forgot you can add to persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 5 php upgrades to prevent overwriting /usr/local/etc/php-fpm.conf
    Code (Text):
    PHP_OVERWRITECONF='n'
    

    You're confusing /usr/local/etc/php-fpm.conf (php-fpm server settings) and /usr/local/lib/php.ini (php settings)

    php.ini settings like date_timezone can be permanent via custom php settings read centminmod.com/phpfpm.html#customphpini. You might want to create /etc/centminmod/php.d/b_customphp.ini to override centmin mod defaults at /etc/centminmod/php.d/a_customphp.ini and restart PHP-FPM. Also outlined in Getting Started Guide Step 17
     
  7. upgrade81

    upgrade81 Premium Member Premium Member

    130
    6
    18
    Sep 5, 2016
    Italy
    Ratings:
    +8
    Local Time:
    3:42 PM
    1.13.8
    10
    you are right

    so perfect .
     
..