[php-src] Issue #8157: post_max_size evaluates .user.ini to late in php-fpm

From: Date: Mon, 28 Feb 2022 17:17:13 +0000
Subject: [php-src] Issue #8157: post_max_size evaluates .user.ini to late in php-fpm
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240083@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8157 Author: thirsch ### Description We are trying to modify the value for post_max_size per directory through a .user.ini-file running on php-fpm behind an Apache webserver using proxy_fgci_module. As mentioned in [the docs](https://www.php.net/manual/en/ini.core.php#ini.sect.data-handling), the setting should be a per-dir setting and we are able to see the correct values using $value = ini_set('post_max_size'); but sending a bigger value using the POST method results in a log message using the default value of 8M: NOTICE: PHP message: PHP Warning: POST Content-Length of 10746083 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 Changing the value in the php.ini, it's working as expected. Also using PUT instead of POST let me pass and receive the data. I'd guess, the POST content size is evaluated too early, before the value of the .user.ini is set? The upload_max_filesize value is working fine and we are able to upload bigger files than the limit, only POST-requests with content bigger than 8M is affected. ### PHP Version Tested on 7.4 and 8.1 ### Operating System _No response_

« previous php.bugs (#240083) next »