View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000675 | AlmaLinux-9 | nginx | public | 2026-09-21 19:28 | 2026-09-21 19:28 |
| Reporter | appsforge | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | x86_64 | OS | almalinux | OS Version | 9.8 |
| Summary | 0000675: $realpath_root in fastcgi_param triggers fastcgi request length mismatch | ||||
| Description | Distribution: AlmaLinux 9.8 Package: nginx-1.24.0-7.module_el9.8.0+307+7a7a3a71.5.alma.1.x86_64 PHP is executed through PHP-FPM. Problem After updating nginx to the package above, using the nginx variable $realpath_root as the value of a fastcgi_param causes nginx to abort the FastCGI request with: [alert] ... fastcgi request length mismatch The problem is reproducible with an otherwise unused FastCGI parameter, so it does not appear to be related to PHP's handling of DOCUMENT_ROOT or SCRIPT_FILENAME. | ||||
| Steps To Reproduce | Minimal reproducer A FastCGI configuration containing the following parameter triggers the problem: fastcgi_param TEST_REALPATH $realpath_root; For example: location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param TEST_REALPATH $realpath_root; fastcgi_pass unix:/run/php-fpm/www.sock; } Requesting an existing PHP file results in nginx logging: [alert] ... fastcgi request length mismatch and the FastCGI request is not processed normally. Control tests Replacing $realpath_root with $document_root works: fastcgi_param TEST_DOCUMENT_ROOT $document_root; Removing the additional parameter also makes the FastCGI request work. PHP-FPM itself works correctly when invoked directly using cgi-fcgi. $realpath_root also works correctly outside FastCGI. For example, using it in an HTTP response header produces the expected resolved filesystem path. Therefore the problem appears to be specific to the use of $realpath_root during FastCGI parameter construction. | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-09-21 19:28 | appsforge | New Issue |