Skip to content

Commit 7de83e2

Browse files
committed
Merge branch 'PHP-8.2'
2 parents ede8adb + 0b4f2fc commit 7de83e2

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
--TEST--
2+
FPM: FastCGI env var path info fix for Apache handler using Unix Domain Socket
3+
--SKIPIF--
4+
<?php include "skipif.inc"; ?>
5+
--FILE--
6+
<?php
7+
8+
require_once "tester.inc";
9+
10+
$cfg = <<<EOT
11+
[global]
12+
error_log = {{FILE:LOG}}
13+
[unconfined]
14+
listen = {{ADDR:UDS}}
15+
pm = dynamic
16+
pm.max_children = 5
17+
pm.start_servers = 1
18+
pm.min_spare_servers = 1
19+
pm.max_spare_servers = 3
20+
php_admin_value[cgi.fix_pathinfo] = yes
21+
EOT;
22+
23+
$code = <<<EOT
24+
<?php
25+
echo \$_SERVER["SCRIPT_NAME"] . "\n";
26+
echo \$_SERVER["SCRIPT_FILENAME"] . "\n";
27+
echo \$_SERVER["PHP_SELF"];
28+
EOT;
29+
30+
$tester = new FPM\Tester($cfg, $code);
31+
[$sourceFilePath, $scriptName] = $tester->createSourceFileAndScriptName();
32+
$tester->start();
33+
$tester->expectLogStartNotices();
34+
$tester
35+
->request(
36+
uri: $scriptName,
37+
address: '{{ADDR:UDS}}',
38+
scriptFilename: "proxy:fcgi://localhost" . $sourceFilePath,
39+
scriptName: $scriptName,
40+
)
41+
->expectBody([$scriptName, $sourceFilePath, $scriptName]);
42+
$tester->terminate();
43+
$tester->close();
44+
45+
?>
46+
Done
47+
--EXPECT--
48+
Done
49+
--CLEAN--
50+
<?php
51+
require_once "tester.inc";
52+
FPM\Tester::clean();
53+
?>

sapi/fpm/tests/fcgi-env-pif-apache-handler-basic.phpt sapi/fpm/tests/fcgi-env-pif-apache-handler-with-pi.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
FPM: FastCGI env var path info fix for Apache handler basic
2+
FPM: FastCGI env var path info fix for Apache handler with PATH_INFO set
33
--SKIPIF--
44
<?php include "skipif.inc"; ?>
55
--FILE--

0 commit comments

Comments
 (0)