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?

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?

1 Answer 1


Yes, you're right - If you specify these values in php-fpm pool config file, it will override "default" values in php.ini config file - but only for this FPM pool.

In addition to this, remember that some of php directives could be defined as php_admin_value and php_admin_flag as described in PHP Documentation (see the bottom of page).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .