Apache / PHP / php-fpm: locale settings change themselves -


i experienced bug apache , php-fpm: locale settings change randomly.

here correct locale settings:

array (     [decimal_point] => .     [thousands_sep] =>      [int_curr_symbol] =>      [currency_symbol] =>      [mon_decimal_point] =>      [mon_thousands_sep] =>      [positive_sign] =>      [negative_sign] =>      [int_frac_digits] => 127     [frac_digits] => 127     [p_cs_precedes] => 127     [p_sep_by_space] => 127     [n_cs_precedes] => 127     [n_sep_by_space] => 127     [p_sign_posn] => 127     [n_sign_posn] => 127     [grouping] => array         (         )      [mon_grouping] => array         (         )  ) 

and here changed settings:

array (     [decimal_point] => ,     [thousands_sep] =>       [int_curr_symbol] => eur      [currency_symbol] => €     [mon_decimal_point] => ,     [mon_thousands_sep] =>       [positive_sign] =>      [negative_sign] => -     [int_frac_digits] => 2     [frac_digits] => 2     [p_cs_precedes] => 0     [p_sep_by_space] => 1     [n_cs_precedes] => 0     [n_sep_by_space] => 1     [p_sign_posn] => 1     [n_sign_posn] => 1     [grouping] => array         (             [0] => 3         )      [mon_grouping] => array         (             [0] => 3         )  ) 

the problem occurs randomly , think due processes, said on php doc:

the locale information maintained per process, not per thread. if running php on multithreaded server api iis, hhvm or apache on windows, may experience sudden changes in locale settings while script running, though script never called setlocale(). happens due other scripts running in different threads of same process @ same time, changing process-wide locale using setlocale().

when removing php-fpm , using fastcgi, problem doesn't occur anymore. how can working php-fpm? problem occurs on shared hosting (we company provides hosting) , need php-fpm in order use pools.

thanks in advance!

i'm not sure apache, nginx has configuration variable set worker threads. configuring apache run 1 thread @ time might solve problem, of course may not desired performance wise.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -