Learn about Centmin Mod LEMP Stack today
Register Now

PHP-FPM Permanent changes to php-fpm

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

  1. upgrade81

    upgrade81 Member

    290
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    11:42 PM
    1.17
    10.3
    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

    50,922
    11,805
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,263
    Local Time:
    8:42 AM
    Nginx 1.25.x
    MariaDB 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 Member

    290
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    11:42 PM
    1.17
    10.3
    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

    50,922
    11,805
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,263
    Local Time:
    8:42 AM
    Nginx 1.25.x
    MariaDB 10.x
  5. upgrade81

    upgrade81 Member

    290
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    11:42 PM
    1.17
    10.3
    at least this can be inserted?
    date.timezone = Europe / Rome
     
  6. eva2000

    eva2000 Administrator Staff Member

    50,922
    11,805
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,263
    Local Time:
    8:42 AM
    Nginx 1.25.x
    MariaDB 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 Member

    290
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    11:42 PM
    1.17
    10.3
    you are right

    so perfect .