mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Add FPM FCGI env Apache handler UDS test
This commit is contained in:
parent
15802dfc62
commit
ebb3213f79
2 changed files with 54 additions and 1 deletions
53
sapi/fpm/tests/fcgi-env-pif-apache-handler-uds.phpt
Normal file
53
sapi/fpm/tests/fcgi-env-pif-apache-handler-uds.phpt
Normal file
|
@ -0,0 +1,53 @@
|
|||
--TEST--
|
||||
FPM: FastCGI env var path info fix for Apache handler using Unix Domain Socket
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once "tester.inc";
|
||||
|
||||
$cfg = <<<EOT
|
||||
[global]
|
||||
error_log = {{FILE:LOG}}
|
||||
[unconfined]
|
||||
listen = {{ADDR:UDS}}
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 1
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
php_admin_value[cgi.fix_pathinfo] = yes
|
||||
EOT;
|
||||
|
||||
$code = <<<EOT
|
||||
<?php
|
||||
echo \$_SERVER["SCRIPT_NAME"] . "\n";
|
||||
echo \$_SERVER["SCRIPT_FILENAME"] . "\n";
|
||||
echo \$_SERVER["PHP_SELF"];
|
||||
EOT;
|
||||
|
||||
$tester = new FPM\Tester($cfg, $code);
|
||||
[$sourceFilePath, $scriptName] = $tester->createSourceFileAndScriptName();
|
||||
$tester->start();
|
||||
$tester->expectLogStartNotices();
|
||||
$tester
|
||||
->request(
|
||||
uri: $scriptName,
|
||||
address: '{{ADDR:UDS}}',
|
||||
scriptFilename: "proxy:fcgi://localhost" . $sourceFilePath,
|
||||
scriptName: $scriptName,
|
||||
)
|
||||
->expectBody([$scriptName, $sourceFilePath, $scriptName]);
|
||||
$tester->terminate();
|
||||
$tester->close();
|
||||
|
||||
?>
|
||||
Done
|
||||
--EXPECT--
|
||||
Done
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "tester.inc";
|
||||
FPM\Tester::clean();
|
||||
?>
|
|
@ -1,5 +1,5 @@
|
|||
--TEST--
|
||||
FPM: FastCGI env var path info fix for Apache handler basic
|
||||
FPM: FastCGI env var path info fix for Apache handler with PATH_INFO set
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
--FILE--
|
Loading…
Add table
Add a link
Reference in a new issue