You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zend_error(E_DEPRECATED, "Deriving $_SERVER['argc'] and $_SERVER['argv'] from $_SERVER['QUERY_STRING'] is deprecated, configure register_argc_argv=0 to suppress this message and access the query parameters via $_SERVER['QUERY_STRING'] or $_GET");
FPM: bug75712 - getenv should not read from $_ENV and $_SERVER
3
+
--SKIPIF--
4
+
<?phpinclude"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}}
15
+
pm = static
16
+
pm.max_children = 1
17
+
env[TEST] = test
18
+
php_value[register_argc_argv] = on
19
+
php_value[html_errors] = off
20
+
EOT;
21
+
22
+
$code = <<<EOT
23
+
<?php
24
+
25
+
var_dump(isset(getenv()['argv']));
26
+
var_dump(isset(getenv()['SERVER_NAME']));
27
+
var_dump(getenv()['TEST']);
28
+
var_dump(isset(getenv()['DTEST']));
29
+
var_dump(getenv('DTEST'));
30
+
putenv('DTEST=dt');
31
+
var_dump(getenv()['DTEST']);
32
+
var_dump(getenv('DTEST'));
33
+
34
+
function notcalled()
35
+
{
36
+
\$_SERVER['argv'];
37
+
}
38
+
EOT;
39
+
40
+
$tester = newFPM\Tester($cfg, $code);
41
+
$tester->start();
42
+
$tester->expectLogStartNotices();
43
+
$response = $tester->request();
44
+
echo"=====", PHP_EOL;
45
+
$response->printBody();
46
+
echo"=====", PHP_EOL;
47
+
$tester->terminate();
48
+
$tester->close();
49
+
50
+
?>
51
+
Done
52
+
--EXPECTF--
53
+
=====
54
+
Deprecated: Deriving $_SERVER['argc'] and $_SERVER['argv'] from $_SERVER['QUERY_STRING'] is deprecated, configure register_argc_argv=0 to suppress this message and access the query parameters via $_SERVER['QUERY_STRING'] or $_GET in %s on line %d
Copy file name to clipboardExpand all lines: tests/basic/011.phpt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,8 @@ for ($i=0; $i<$argc; $i++) {
18
18
}
19
19
20
20
?>
21
-
--EXPECT--
21
+
--EXPECTF--
22
+
Deprecated: Deriving $_SERVER['argc'] and $_SERVER['argv'] from $_SERVER['QUERY_STRING'] is deprecated, configure register_argc_argv=0 to suppress this message and access the query parameters via $_SERVER['QUERY_STRING'] or $_GET in %s on line %d
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows: --INI-- is ignored due to 4b9cd27ff5c0177dcb160caeae1ea79e761ada58");
6
+
?>
7
+
--INI--
8
+
register_argc_argv=1
9
+
--CGI--
10
+
--FILE--
11
+
<?php
12
+
13
+
var_dump($_SERVER['argc'], $_SERVER['argv']);
14
+
15
+
?>
16
+
--EXPECTF--
17
+
Deprecated: Deriving $_SERVER['argc'] and $_SERVER['argv'] from $_SERVER['QUERY_STRING'] is deprecated, configure register_argc_argv=0 to suppress this message and access the query parameters via $_SERVER['QUERY_STRING'] or $_GET in %s on line %d
Copy file name to clipboardExpand all lines: tests/basic/011_windows.phpt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ for ($i=0; $i<$argc; $i++) {
14
14
}
15
15
16
16
?>
17
-
--EXPECT--
17
+
--EXPECTF--
18
+
Deprecated: Deriving $_SERVER['argc'] and $_SERVER['argv'] from $_SERVER['QUERY_STRING'] is deprecated, configure register_argc_argv=0 to suppress this message and access the query parameters via $_SERVER['QUERY_STRING'] or $_GET in %s on line %d
0 commit comments