Setting php values in php-fpm confs instead of php.ini

Posted by zsero on Server Fault See other posts from Server Fault or by zsero
Published on 2012-07-07T15:56:37Z Indexed on 2012/07/10 9:17 UTC
Read the original article Hit count: 702

Filed under:
|
|
|
|

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?

© Server Fault or respective owner

Related posts about php

Related posts about nginx