Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.