Discover Centmin Mod today
Register Now

Beta Branch add option to raise PHP 7+'s PCRE JIT Stack size in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Oct 27, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    11:06 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    add option to raise PHP 7+'s PCRE JIT Stack size in 123.09beta01

    Added 2 variables below which can be set in persistent config file. When enabled PHP_PCREJIT_STACKSIZE_ADJUST='y' and PHP_PCREJIT_STACKSIZE='512' are set in persistent config file /etc/centminmod/ prior to menu option 5 recompiles/updates, allows you to raise PHP's default PCRE JIT stack size Increase the PCRE JIT stack size by khromov · Pull Request #2910 · php/php-src from current defaults which for PHP 7.2 is 64 x 1024 max and PHP 7.3 is 192 x 1024 max and PHP 7.4 is 256 x 1024 max. PHP_PCREJIT_STACKSIZE defines the value to raise to i.e. 512 x 1024 for PCRE_JIT_STACK_MAX_SIZE which is hard coded and set by PHP. Disabled by default PHP_PCREJIT_STACKSIZE_ADJUST='n'.
    Code (Text):

    If your PHP web app spits out errors like below, then raising PHP 7+ PCRE JIT Stack size might help. Common web apps which may run into this are Laravel, Drupal and Wordpress. And usual workaround was to disable PHP 7's PCRE JIT via setting php.ini config setting pcre.jit = 0 which isn't ideal. So this update allows you to raise PHP 7+ PCRE JIT Stack size and keep the default pcre.jit = 1 enabled.
    Continue reading...

    123.09beta01 branch