21
votes

under Apache + PHP as module you can set

php_value post_max_size 8M

inside a .htaccess.

How can I do this under Apache + PHP-FPM?

I'm using the FastCgiExternalServer directive, but want to keep the functionality within the .htaccess file (if possible).

Thank you!

2
This HowTo describes the use of the php-fcgi-starter which probably is what you are looking for: howtoforge.com/… - arkascha
You can't. Find another way to solve the problem (multiple fpm process pools, code it in PHP) - symcbean

2 Answers

20
votes

I've found an somewhat elegant way to do it: .user.ini files

It seems to be the .htaccess version for PHP-FPM.

12
votes

You can use

SetEnv PHP_VALUE "post_max_size = 8M"

or

SetEnv PHP_ADMIN_VALUE "post_max_size = 8M"

in the apache configuration.