Setting php values in php-fpm confs instead of php.ini
I'd like to set values in php-fpm conf files what are normally set in php.ini. I'm using nginx.
I've created the following setting, but I'm not sure if this would work.
php_value[memory_limit] = 96M
php_value[max_execution_time] = 120
php_value[max_input_time] = 300
php_value[php_post_max_size] = 25M
php_value[upload_max_filesize] = 25M
Do you think if this is OK like this for a LEB?
What happens when a value is both set in php.ini and in php-fpm conf files? The php-fpm overrides the ini one?
Finally, isn't it a problem that this way I can set different values for all virtual hosts? I mean php.ini seems like a global setting, while this is host dependent. Can different hosts run with different memory-limits, etc?
Comments
Yes, those value override the global settings in php.ini.
You can have different values per pool. So you'd define your pools, set the php values and then assign your hosts to the pools.