]> granicus.if.org Git - php/commitdiff
- Remove gpc_order since it doesn't serve any purpose.
authorfoobar <sniper@php.net>
Mon, 26 Jan 2004 04:15:08 +0000 (04:15 +0000)
committerfoobar <sniper@php.net>
Mon, 26 Jan 2004 04:15:08 +0000 (04:15 +0000)
main/main.c
main/php_globals.h
main/php_variables.c
php.ini-dist
php.ini-recommended

index 6c8637008483e80bcb09db9964e4cefadb700107..53e8e7e004fabb0db34b17f8621311075f667af1 100644 (file)
@@ -297,7 +297,6 @@ PHP_INI_BEGIN()
        STD_PHP_INI_ENTRY("default_mimetype",           SAPI_DEFAULT_MIMETYPE,  PHP_INI_ALL,    OnUpdateString,                 default_mimetype,               sapi_globals_struct,sapi_globals)
        STD_PHP_INI_ENTRY("error_log",                          NULL,           PHP_INI_ALL,            OnUpdateString,                 error_log,                              php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("extension_dir",                      PHP_EXTENSION_DIR,              PHP_INI_SYSTEM,         OnUpdateStringUnempty,  extension_dir,                  php_core_globals,       core_globals)
-       STD_PHP_INI_ENTRY("gpc_order",                          "GPC",          PHP_INI_ALL,            OnUpdateStringUnempty,  gpc_order,                              php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("include_path",                       PHP_INCLUDE_PATH,               PHP_INI_ALL,            OnUpdateStringUnempty,  include_path,                   php_core_globals,       core_globals)
        PHP_INI_ENTRY("max_execution_time",                     "30",           PHP_INI_ALL,                    OnUpdateTimeout)
        STD_PHP_INI_ENTRY("open_basedir",                       NULL,           PHP_INI_SYSTEM,         OnUpdateString,                 open_basedir,                   php_core_globals,       core_globals)
@@ -309,7 +308,7 @@ PHP_INI_BEGIN()
        STD_PHP_INI_ENTRY("upload_tmp_dir",                     NULL,           PHP_INI_SYSTEM,         OnUpdateStringUnempty,  upload_tmp_dir,                 php_core_globals,       core_globals)
 
        STD_PHP_INI_ENTRY("user_dir",                           NULL,           PHP_INI_SYSTEM,         OnUpdateString,                 user_dir,                               php_core_globals,       core_globals)
-       STD_PHP_INI_ENTRY("variables_order",            NULL,           PHP_INI_ALL,            OnUpdateStringUnempty,  variables_order,                php_core_globals,       core_globals)
+       STD_PHP_INI_ENTRY("variables_order",            "EGPCS",        PHP_INI_ALL,            OnUpdateStringUnempty,  variables_order,                php_core_globals,       core_globals)
 
        STD_PHP_INI_ENTRY("error_append_string",        NULL,           PHP_INI_ALL,            OnUpdateString,                 error_append_string,    php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("error_prepend_string",       NULL,           PHP_INI_ALL,            OnUpdateString,                 error_prepend_string,   php_core_globals,       core_globals)
index ca2caa461d3783a12572230f9a27e1b7b757b9f5..2d9a0fdfbe5aaa88dd22f2ea42ab77a066ec1fdd 100644 (file)
@@ -103,7 +103,6 @@ struct _php_core_globals {
 
        arg_separators arg_separator;
 
-       char *gpc_order;
        char *variables_order;
 
        HashTable rfc1867_protected_variables;
index 514b9c98bfe633aefb369a19cf53eb7f36837217..3cf65a04e4b9bf5ef8d216c6bca4853b80f743f0 100644 (file)
@@ -549,11 +549,9 @@ int php_hash_environment(TSRMLS_D)
 {
        char *p;
        unsigned char _gpc_flags[5] = {0, 0, 0, 0, 0};
-       zend_bool have_variables_order;
        zval *dummy_track_vars_array = NULL;
        zend_bool initialized_dummy_track_vars_array=0;
        zend_bool jit_initialization = (!PG(register_globals) && !PG(register_long_arrays));
-       char *variables_order;
        struct auto_global_record {
                char *name;
                uint name_len;
@@ -576,22 +574,7 @@ int php_hash_environment(TSRMLS_D)
                PG(http_globals)[i] = NULL;
        }
 
-       if (PG(variables_order)) {
-               variables_order = PG(variables_order);
-               have_variables_order=1;
-       } else {
-               variables_order = PG(gpc_order);
-               have_variables_order=0;
-               ALLOC_ZVAL(PG(http_globals)[TRACK_VARS_ENV]);
-               array_init(PG(http_globals)[TRACK_VARS_ENV]);
-               INIT_PZVAL(PG(http_globals)[TRACK_VARS_ENV]);
-               php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
-               if (PG(register_globals)) {
-                       php_autoglobal_merge(&EG(symbol_table), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV]) TSRMLS_CC);
-               }
-       }
-
-       for (p=variables_order; p && *p; p++) {
+       for (p=PG(variables_order); p && *p; p++) {
                switch(*p) {
                        case 'p':
                        case 'P':
@@ -626,15 +609,11 @@ int php_hash_environment(TSRMLS_D)
                        case 'e':
                        case 'E':
                                if (!jit_initialization && !_gpc_flags[3]) {
-                                       if (have_variables_order) {
-                                               php_auto_globals_create_env("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
-                                               if (PG(register_globals)) {
-                                                       php_autoglobal_merge(&EG(symbol_table), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV]) TSRMLS_CC);
-                                               }
-                                       } else {
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported 'e' element (environment) used in gpc_order - use variables_order instead");
-                                       }
+                                       php_auto_globals_create_env("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
                                        _gpc_flags[3]=1;
+                                       if (PG(register_globals)) {
+                                               php_autoglobal_merge(&EG(symbol_table), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV]) TSRMLS_CC);
+                                       }
                                }
                                break;
                        case 's':
@@ -650,13 +629,6 @@ int php_hash_environment(TSRMLS_D)
                }
        }
 
-       if (!jit_initialization && !have_variables_order && !_gpc_flags[4]) {
-               php_register_server_variables(TSRMLS_C);
-               if (PG(register_globals)) {
-                       php_autoglobal_merge(&EG(symbol_table), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]) TSRMLS_CC);
-               }
-       }
-
        /* argv/argc support */
        if (PG(register_argc_argv)) {
                php_build_argv(SG(request_info).query_string, PG(http_globals)[TRACK_VARS_SERVER] TSRMLS_CC);
@@ -734,21 +706,14 @@ static zend_bool php_auto_globals_create_env(char *name, uint name_len TSRMLS_DC
 static zend_bool php_auto_globals_create_request(char *name, uint name_len TSRMLS_DC)
 {
        zval *form_variables;
-       char *variables_order;
        unsigned char _gpc_flags[3] = {0, 0, 0};
        char *p;
 
-       if (PG(variables_order)) {
-               variables_order = PG(variables_order);
-       } else {
-               variables_order = PG(gpc_order);
-       }
-
        ALLOC_ZVAL(form_variables);
        array_init(form_variables);
        INIT_PZVAL(form_variables);
 
-       for (p=variables_order; p && *p; p++) {
+       for (p=PG(variables_order); p && *p; p++) {
                switch (*p) {
                        case 'g':
                        case 'G':
index 77adcb0928c875eaff4625ced474108be2c2f3e7..76dae079b3995475796e144dac5ab28e3cfdb7f1 100644 (file)
@@ -382,9 +382,6 @@ register_argc_argv = On
 ; Maximum size of POST data that PHP will accept.
 post_max_size = 8M
 
-; This directive is deprecated.  Use variables_order instead.
-gpc_order = "GPC"
-
 ; Magic quotes
 ;
 
@@ -531,7 +528,7 @@ default_socket_timeout = 60
 
 
 ;Windows Extensions
-;Note that ODBC support is now built in, so no dll is needed for it.
+;Note that ODBC support is built in, so no dll is needed for it.
 ;
 ;extension=php_bz2.dll
 ;extension=php_cpdf.dll
index cc67b5621d9972ad6e2028bd95a985607eb72df5..b9140e123bc7b2a36d36deff675c1398ee4a71b0 100644 (file)
@@ -401,9 +401,6 @@ register_argc_argv = Off
 ; Maximum size of POST data that PHP will accept.
 post_max_size = 8M
 
-; This directive is deprecated.  Use variables_order instead.
-gpc_order = "GPC"
-
 ; Magic quotes
 ;
 
@@ -550,7 +547,7 @@ default_socket_timeout = 60
 
 
 ;Windows Extensions
-;Note that ODBC support is now built in, so no dll is needed for it.
+;Note that ODBC support is built in, so no dll is needed for it.
 ;
 ;extension=php_bz2.dll
 ;extension=php_cpdf.dll