1--TEST-- 2FPM: FastCGI env var no path info fix for custom setup without PATH_INFO and with PATH_TRANSLATED 3--SKIPIF-- 4<?php include "skipif.inc"; ?> 5--FILE-- 6<?php 7 8require_once "tester.inc"; 9 10$cfg = <<<EOT 11[global] 12error_log = {{FILE:LOG}} 13[unconfined] 14listen = {{ADDR}} 15pm = dynamic 16pm.max_children = 5 17pm.start_servers = 1 18pm.min_spare_servers = 1 19pm.max_spare_servers = 3 20php_admin_value[cgi.fix_pathinfo] = no 21php_admin_value[cgi.discard_path] = no 22EOT; 23 24$code = <<<EOT 25<?php 26echo \$_SERVER["SCRIPT_NAME"] . "\n"; 27echo \$_SERVER["SCRIPT_FILENAME"] . "\n"; 28echo \$_SERVER["PHP_SELF"]; 29EOT; 30 31$tester = new FPM\Tester($cfg, $code); 32[$sourceFilePath, $scriptName] = $tester->createSourceFileAndScriptName(); 33$tester->start(); 34$tester->expectLogStartNotices(); 35$tester 36 ->request( 37 headers: [ 38 'PATH_TRANSLATED' => $sourceFilePath, 39 ], 40 uri: $scriptName . '/pinfo', 41 scriptFilename: $sourceFilePath . '/pinfo', // should be ignored as PATH_TRANSLATED is used 42 scriptName: $scriptName, 43 ) 44 ->expectBody([$scriptName, $sourceFilePath . '/pinfo', $scriptName]); 45$tester->terminate(); 46$tester->close(); 47 48?> 49Done 50--EXPECT-- 51Done 52--CLEAN-- 53<?php 54require_once "tester.inc"; 55FPM\Tester::clean(); 56?> 57