Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Setting php values in php-fpm confs instead of php.ini
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

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

zserozsero Member
edited July 2012 in General

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

  • sleddogsleddog Member
    edited July 2012

    @zsero said: What happens when a value is both set in php.ini and in php-fpm conf files? The php-fpm overrides the ini one?

    Yes, those value override the global settings in php.ini.

    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?

    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.

Sign In or Register to comment.