Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("report_zend_debug", "0", PHP_INI_ALL, OnUpdateBool, report_zend_debug, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateLong, output_buffering, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("output_handler", NULL, PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateString, output_handler, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("register_argc_argv", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("short_open_tag", DEFAULT_SHORT_OPEN_TAG, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals)

Expand Down
15 changes: 4 additions & 11 deletions php.ini-development
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@
; Development Value: 4096
; Production Value: 4096

; register_argc_argv
; Default Value: On
; Development Value: Off
; Production Value: Off

; request_order
; Default Value: None
; Development Value: "GP"
Expand Down Expand Up @@ -665,14 +660,12 @@ request_order = "GP"
; that were passed when the script was invoked. These arrays are extremely
; useful when running scripts from the command line. When this directive is
; enabled, registering these variables consumes CPU cycles and memory each time
; a script is executed. For performance reasons, this feature should be disabled
; on production servers.
; a script is executed. For security reasons, this feature should be disabled
; for non-CLI SAPIs.
; Note: This directive is hardcoded to On for the CLI SAPI
; Default Value: On
; Development Value: Off
; Production Value: Off
; This directive is deprecated.
; https://php.net/register-argc-argv
register_argc_argv = Off
;register_argc_argv = Off

; When enabled, the ENV, REQUEST and SERVER variables are created when they're
; first used (Just In Time) instead of when the script starts. If these
Expand Down
15 changes: 4 additions & 11 deletions php.ini-production
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@
; Development Value: 4096
; Production Value: 4096

; register_argc_argv
; Default Value: On
; Development Value: Off
; Production Value: Off

; request_order
; Default Value: None
; Development Value: "GP"
Expand Down Expand Up @@ -667,14 +662,12 @@ request_order = "GP"
; that were passed when the script was invoked. These arrays are extremely
; useful when running scripts from the command line. When this directive is
; enabled, registering these variables consumes CPU cycles and memory each time
; a script is executed. For performance reasons, this feature should be disabled
; on production servers.
; a script is executed. For security reasons, this feature should be disabled
; for non-CLI SAPIs.
; Note: This directive is hardcoded to On for the CLI SAPI
; Default Value: On
; Development Value: Off
; Production Value: Off
; This directive is deprecated.
; https://php.net/register-argc-argv
register_argc_argv = Off
;register_argc_argv = Off

; When enabled, the ENV, REQUEST and SERVER variables are created when they're
; first used (Just In Time) instead of when the script starts. If these
Expand Down
4 changes: 4 additions & 0 deletions tests/basic/011.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
Testing $argc and $argv handling (GET)
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows: --INI-- is ignored due to 4b9cd27ff5c0177dcb160caeae1ea79e761ada58");
?>
--INI--
register_argc_argv=1
--GET--
Expand Down
22 changes: 22 additions & 0 deletions tests/basic/011_windows.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
Testing $argc and $argv handling (GET)
--INI--
register_argc_argv=1
--GET--
foo=ab+cd+ef+123+test
--FILE--
<?php
$argc = $_SERVER['argc'];
$argv = $_SERVER['argv'];

for ($i=0; $i<$argc; $i++) {
echo "$i: ".$argv[$i]."\n";
}

?>
--EXPECT--
0: foo=ab
1: cd
2: ef
3: 123
4: test