summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/filter/filter.c9
-rw-r--r--ext/mbstring/mb_gpc.c14
-rw-r--r--ext/mbstring/mb_gpc.h1
-rw-r--r--ext/mbstring/mbstring.c1
-rw-r--r--ext/mbstring/tests/mb_parse_str.phpt1
-rw-r--r--ext/mbstring/tests/mb_parse_str02.phpt1
-rw-r--r--ext/session/session.c100
-rw-r--r--ext/session/tests/001.phpt14
-rw-r--r--ext/session/tests/003.phpt10
-rw-r--r--ext/session/tests/004.phpt16
-rw-r--r--ext/session/tests/005.phpt41
-rw-r--r--ext/session/tests/006.phpt18
-rw-r--r--ext/session/tests/007.phpt3
-rw-r--r--ext/session/tests/008-php4.2.3.phpt71
-rw-r--r--ext/session/tests/009.phpt3
-rw-r--r--ext/session/tests/010.phpt1
-rw-r--r--ext/session/tests/011.phpt1
-rw-r--r--ext/session/tests/012.phpt8
-rw-r--r--ext/session/tests/013.phpt2
-rw-r--r--ext/session/tests/014.phpt14
-rw-r--r--ext/session/tests/019.phpt14
-rw-r--r--ext/session/tests/bug24592.phpt1
-rw-r--r--ext/session/tests/bug26862.phpt1
-rw-r--r--ext/soap/TODO.old1
-rw-r--r--ext/standard/tests/general_functions/get_cfg_var_variation8.phpt6
-rw-r--r--ext/standard/tests/general_functions/import_request.phpt2
26 files changed, 68 insertions, 286 deletions
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 82708dda3b..b64c6bd652 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -450,8 +450,6 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
orig_var = estrdup(var);
/* Store the RAW variable internally */
- /* FIXME: Should not use php_register_variable_ex as that also registers
- * globals when register_globals is turned on */
Z_STRLEN(raw_var) = val_len;
Z_STRVAL(raw_var) = estrndup(*val, val_len);
Z_TYPE(raw_var) = IS_STRING;
@@ -461,8 +459,6 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
if (val_len) {
/* Register mangled variable */
- /* FIXME: Should not use php_register_variable_ex as that also registers
- * globals when register_globals is turned on */
Z_STRLEN(new_var) = val_len;
Z_TYPE(new_var) = IS_STRING;
@@ -537,7 +533,6 @@ static zval *php_filter_get_storage(long arg TSRMLS_DC)/* {{{ */
{
zval *array_ptr = NULL;
- zend_bool jit_initialization = (PG(auto_globals_jit) && !PG(register_globals));
switch (arg) {
case PARSE_GET:
@@ -550,13 +545,13 @@ static zval *php_filter_get_storage(long arg TSRMLS_DC)/* {{{ */
array_ptr = IF_G(cookie_array);
break;
case PARSE_SERVER:
- if (jit_initialization) {
+ if (PG(auto_globals_jit)) {
zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
}
array_ptr = IF_G(server_array);
break;
case PARSE_ENV:
- if (jit_initialization) {
+ if (PG(auto_globals_jit)) {
zend_is_auto_global("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
}
array_ptr = IF_G(env_array);
diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c
index b43aadbd45..c4bf0419d9 100644
--- a/ext/mbstring/mb_gpc.c
+++ b/ext/mbstring/mb_gpc.c
@@ -151,7 +151,6 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
info.data_type = arg;
info.separator = separator;
- info.force_register_globals = 0;
info.report_errors = 0;
info.to_encoding = MBSTRG(internal_encoding);
info.to_language = MBSTRG(language);
@@ -210,13 +209,6 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_
mbfl_string_init_set(&resvar, info->to_language, info->to_encoding);
mbfl_string_init_set(&resval, info->to_language, info->to_encoding);
- /* register_globals stuff
- * XXX: this feature is going to be deprecated? */
-
- if (info->force_register_globals && !(prev_rg_state = PG(register_globals))) {
- zend_alter_ini_entry("register_globals", sizeof("register_globals"), "1", sizeof("1")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME);
- }
-
if (!res || *res == '\0') {
goto out;
}
@@ -346,11 +338,6 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_
}
out:
- /* register_global stuff */
- if (info->force_register_globals && !prev_rg_state) {
- zend_alter_ini_entry("register_globals", sizeof("register_globals"), "0", sizeof("0")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME);
- }
-
if (convd != NULL) {
MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd);
mbfl_buffer_converter_delete(convd);
@@ -376,7 +363,6 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler)
info.data_type = PARSE_POST;
info.separator = "&";
- info.force_register_globals = 0;
info.report_errors = 0;
info.to_encoding = MBSTRG(internal_encoding);
info.to_language = MBSTRG(language);
diff --git a/ext/mbstring/mb_gpc.h b/ext/mbstring/mb_gpc.h
index 593b413253..83090c3bc9 100644
--- a/ext/mbstring/mb_gpc.h
+++ b/ext/mbstring/mb_gpc.h
@@ -32,7 +32,6 @@
typedef struct _php_mb_encoding_handler_info_t {
int data_type;
const char *separator;
- unsigned int force_register_globals: 1;
unsigned int report_errors: 1;
enum mbfl_no_language to_language;
enum mbfl_no_encoding to_encoding;
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index baa93983a3..1291ce2e2c 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -1896,7 +1896,6 @@ PHP_FUNCTION(mb_parse_str)
info.data_type = PARSE_STRING;
info.separator = PG(arg_separator).input;
- info.force_register_globals = (track_vars_array == NULL);
info.report_errors = 1;
info.to_encoding = MBSTRG(current_internal_encoding);
info.to_language = MBSTRG(language);
diff --git a/ext/mbstring/tests/mb_parse_str.phpt b/ext/mbstring/tests/mb_parse_str.phpt
index 8b320b0845..fcfbbd9fe4 100644
--- a/ext/mbstring/tests/mb_parse_str.phpt
+++ b/ext/mbstring/tests/mb_parse_str.phpt
@@ -4,7 +4,6 @@ mb_parse_str()
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--INI--
arg_separator.input=&
-register_globals=0
--FILE--
<?php
$queries = array(
diff --git a/ext/mbstring/tests/mb_parse_str02.phpt b/ext/mbstring/tests/mb_parse_str02.phpt
index 51cfb63cb9..44ed44865c 100644
--- a/ext/mbstring/tests/mb_parse_str02.phpt
+++ b/ext/mbstring/tests/mb_parse_str02.phpt
@@ -4,7 +4,6 @@ mb_parse_str() test 2
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--INI--
arg_separator.input=&#
-register_globals=0
--FILE--
<?php
$queries = array(
diff --git a/ext/session/session.c b/ext/session/session.c
index 73fc53d741..c6c4a39401 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -131,76 +131,18 @@ PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC) /* {{{ */
return;
}
- /* Set up a proper reference between $_SESSION["x"] and $x. */
+ if (sym_track == NULL) {
+ zval *empty_var;
- if (PG(register_globals)) {
- zval **sym_global = NULL;
-
- if (zend_hash_find(&EG(symbol_table), name, namelen + 1, (void *) &sym_global) == SUCCESS) {
- if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {
- return;
- }
- }
-
- if (sym_global == NULL && sym_track == NULL) {
- zval *empty_var;
-
- ALLOC_INIT_ZVAL(empty_var); /* this sets refcount to 1 */
- Z_SET_REFCOUNT_P(empty_var, 0); /* our module does not maintain a ref */
- /* The next call will increase refcount by NR_OF_SYM_TABLES==2 */
- zend_set_hash_symbol(empty_var, name, namelen, 1, 2, Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
- } else if (sym_global == NULL) {
- SEPARATE_ZVAL_IF_NOT_REF(sym_track);
- zend_set_hash_symbol(*sym_track, name, namelen, 1, 1, &EG(symbol_table));
- } else if (sym_track == NULL) {
- SEPARATE_ZVAL_IF_NOT_REF(sym_global);
- zend_set_hash_symbol(*sym_global, name, namelen, 1, 1, Z_ARRVAL_P(PS(http_session_vars)));
- }
- } else {
- if (sym_track == NULL) {
- zval *empty_var;
-
- ALLOC_INIT_ZVAL(empty_var);
- ZEND_SET_SYMBOL_WITH_LENGTH(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1, empty_var, 1, 0);
- }
+ ALLOC_INIT_ZVAL(empty_var);
+ ZEND_SET_SYMBOL_WITH_LENGTH(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1, empty_var, 1, 0);
}
}
/* }}} */
PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, php_unserialize_data_t *var_hash TSRMLS_DC) /* {{{ */
{
- if (PG(register_globals)) {
- zval **old_symbol;
- if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void *)&old_symbol) == SUCCESS) {
- if ((Z_TYPE_PP(old_symbol) == IS_ARRAY && Z_ARRVAL_PP(old_symbol) == &EG(symbol_table)) || *old_symbol == PS(http_session_vars)) {
- return;
- }
-
- /* A global symbol with the same name exists already. That
- * symbol might have been created by other means (e.g. $_GET).
- *
- * hash_update in zend_set_hash_symbol is not good, because
- * it will leave referenced variables (such as local instances
- * of a global variable) dangling.
- *
- * BTW: if you use register_globals references between
- * session-vars won't work because of this very reason! */
-
- REPLACE_ZVAL_VALUE(old_symbol,state_val,1);
-
- /* The following line will update the reference table used for
- * unserialization. It is optional, because some storage
- * formats may not be able to represent references. */
-
- if (var_hash) {
- PHP_VAR_UNSERIALIZE_ZVAL_CHANGED(var_hash,state_val,*old_symbol);
- }
-
- zend_set_hash_symbol(*old_symbol, name, namelen, 1, 1, Z_ARRVAL_P(PS(http_session_vars)));
- } else {
- zend_set_hash_symbol(state_val, name, namelen, 1, 2, Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
- }
- } else IF_SESSION_VARS() {
+ IF_SESSION_VARS() {
zend_set_hash_symbol(state_val, name, namelen, PZVAL_IS_REF(state_val), 1, Z_ARRVAL_P(PS(http_session_vars)));
}
}
@@ -212,20 +154,6 @@ PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var TSR
IF_SESSION_VARS() {
ret = zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1, (void **) state_var);
-
- /* If register_globals is enabled, and
- * if there is an entry for the slot in $_SESSION, and
- * if that entry is still set to NULL, and
- * if the global var exists, then
- * we prefer the same key in the global sym table. */
-
- if (PG(register_globals) && ret == SUCCESS && Z_TYPE_PP(*state_var) == IS_NULL) {
- zval **tmp;
-
- if (zend_hash_find(&EG(symbol_table), name, namelen + 1, (void **) &tmp) == SUCCESS) {
- *state_var = tmp;
- }
- }
}
return ret;
}
@@ -546,7 +474,7 @@ static void php_session_save_current_state(TSRMLS_D) /* {{{ */
int ret = FAILURE;
IF_SESSION_VARS() {
- if (PS(bug_compat) && !PG(register_globals)) {
+ if (PS(bug_compat)) {
HashTable *ht = Z_ARRVAL_P(PS(http_session_vars));
HashPosition pos;
zval **val;
@@ -564,7 +492,7 @@ static void php_session_save_current_state(TSRMLS_D) /* {{{ */
}
if (do_warn && PS(bug_compat_warn)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively");
}
}
@@ -1895,20 +1823,6 @@ static PHP_FUNCTION(session_unset)
SEPARATE_ZVAL_IF_NOT_REF(&PS(http_session_vars));
ht = Z_ARRVAL_P(PS(http_session_vars));
- if (PG(register_globals)) {
- uint str_len;
- char *str;
- ulong num_key;
- HashPosition pos;
-
- zend_hash_internal_pointer_reset_ex(ht, &pos);
-
- while (zend_hash_get_current_key_ex(ht, &str, &str_len, &num_key, 0, &pos) == HASH_KEY_IS_STRING) {
- zend_delete_global_variable(str, str_len - 1 TSRMLS_CC);
- zend_hash_move_forward_ex(ht, &pos);
- }
- }
-
/* Clean $_SESSION. */
zend_hash_clean(ht);
}
diff --git a/ext/session/tests/001.phpt b/ext/session/tests/001.phpt
index 19dff78e1f..eb04dc1147 100644
--- a/ext/session/tests/001.phpt
+++ b/ext/session/tests/001.phpt
@@ -5,7 +5,6 @@ session object serialization
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.serialize_handler=php
session.save_handler=files
--FILE--
@@ -24,17 +23,14 @@ $baz->method();
$arr[3] = new foo;
$arr[3]->method();
-session_register("baz");
-session_register("arr");
+session_start();
+
+$_SESSION["baz"] = $baz;
+$_SESSION["arr"] = $arr;
print session_encode()."\n";
session_destroy();
---EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
-
-Deprecated: Function session_register() is deprecated in %s on line %d
-
-Deprecated: Function session_register() is deprecated in %s on line %d
+--EXPECT--
baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}}
diff --git a/ext/session/tests/003.phpt b/ext/session/tests/003.phpt
index 8a4e0027f8..03c3b95766 100644
--- a/ext/session/tests/003.phpt
+++ b/ext/session/tests/003.phpt
@@ -5,7 +5,6 @@ session object deserialization
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.serialize_handler=php
session.save_handler=files
--FILE--
@@ -21,14 +20,13 @@ session_id("abtest");
session_start();
session_decode('baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}');
-$baz->method();
-$arr[3]->method();
+$_SESSION["baz"]->method();
+$_SESSION["arr"][3]->method();
-var_dump($baz);
-var_dump($arr);
+var_dump($_SESSION["baz"]);
+var_dump($_SESSION["arr"]);
session_destroy();
--EXPECT--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
object(foo)#1 (2) {
["bar"]=>
string(2) "ok"
diff --git a/ext/session/tests/004.phpt b/ext/session/tests/004.phpt
index 2ff675e7cd..aeb2c8b363 100644
--- a/ext/session/tests/004.phpt
+++ b/ext/session/tests/004.phpt
@@ -5,7 +5,6 @@ session_set_save_handler test
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.name=PHPSESSID
session.serialize_handler=php
--FILE--
@@ -56,24 +55,23 @@ session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd,
session_id("abtest");
session_start();
-$baz->method();
-$arr[3]->method();
+$_SESSION["baz"]->method();
+$_SESSION["arr"][3]->method();
-var_dump($baz);
-var_dump($arr);
+var_dump($_SESSION["baz"]);
+var_dump($_SESSION["arr"]);
session_write_close();
session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
session_start();
-var_dump($baz);
-var_dump($arr);
+var_dump($_SESSION["baz"]);
+var_dump($_SESSION["arr"]);
session_destroy();
?>
--EXPECT--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
OPEN: PHPSESSID
READ: abtest
object(foo)#2 (2) {
@@ -94,7 +92,7 @@ array(1) {
WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}}
OPEN: PHPSESSID
READ: abtest
-object(foo)#4 (2) {
+object(foo)#3 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
diff --git a/ext/session/tests/005.phpt b/ext/session/tests/005.phpt
index 124f0a831e..a970e6b71d 100644
--- a/ext/session/tests/005.phpt
+++ b/ext/session/tests/005.phpt
@@ -5,7 +5,6 @@ custom save handler, multiple session_start()s, complex data structure test.
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.name=PHPSESSID
session.serialize_handler=php
--FILE--
@@ -58,37 +57,41 @@ session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd,
session_id("abtest");
session_start();
-$baz->method();
-$arr[3]->method();
+session_decode($hnd->data);
-var_dump($baz);
-var_dump($arr);
+$_SESSION["baz"]->method();
+$_SESSION["arr"][3]->method();
+
+var_dump($_SESSION["baz"]);
+var_dump($_SESSION["arr"]);
session_write_close();
session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
session_start();
-$baz->method();
-$arr[3]->method();
+$_SESSION["baz"]->method();
+$_SESSION["arr"][3]->method();
-$c = 123;
-session_register("c");
-var_dump($baz); var_dump($arr); var_dump($c);
+$_SESSION["c"] = 123;
+var_dump($_SESSION["baz"]);
+var_dump($_SESSION["arr"]);
+var_dump($_SESSION["c"]);
session_write_close();
session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
session_start();
-var_dump($baz); var_dump($arr); var_dump($c);
+var_dump($_SESSION["baz"]);
+var_dump($_SESSION["arr"]);
+var_dump($_SESSION["c"]);
session_destroy();
?>
--EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
OPEN: PHPSESSID
READ: abtest
-object(foo)#2 (2) {
+object(foo)#4 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
@@ -96,7 +99,7 @@ object(foo)#2 (2) {
}
array(1) {
[3]=>
- object(foo)#3 (2) {
+ object(foo)#2 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
@@ -107,9 +110,7 @@ WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O
CLOSE
OPEN: PHPSESSID
READ: abtest
-
-Deprecated: Function session_register() is deprecated in %s on line %d
-object(foo)#4 (2) {
+object(foo)#2 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
@@ -117,7 +118,7 @@ object(foo)#4 (2) {
}
array(1) {
[3]=>
- object(foo)#2 (2) {
+ object(foo)#4 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
@@ -129,7 +130,7 @@ WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O
CLOSE
OPEN: PHPSESSID
READ: abtest
-object(foo)#3 (2) {
+object(foo)#4 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
@@ -137,7 +138,7 @@ object(foo)#3 (2) {
}
array(1) {
[3]=>
- object(foo)#4 (2) {
+ object(foo)#2 (2) {
["bar"]=>
string(2) "ok"
["yes"]=>
diff --git a/ext/session/tests/006.phpt b/ext/session/tests/006.phpt
index 7c7af61b73..03fca10381 100644
--- a/ext/session/tests/006.phpt
+++ b/ext/session/tests/006.phpt
@@ -5,7 +5,6 @@ correct instantiation of references between variables in sessions
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.serialize_handler=php
session.save_handler=files
--FILE--
@@ -32,12 +31,11 @@ $b = new b($a);
echo "original values:\n";
var_dump($a,$b);
-session_register("a");
-session_register("b");
+$_SESSION["a"] = $a;
+$_SESSION["b"] = $b;
session_write_close();
-session_unregister("a");
-session_unregister("b");
+unset($_SESSION["a"], $_SESSION["b"]);
session_start();
@@ -45,7 +43,6 @@ echo "values after session:\n";
var_dump($a,$b);
?>
--EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
original values:
object(a)#%d (1) {
["test"]=>
@@ -58,14 +55,6 @@ object(b)#%d (1) {
string(5) "hallo"
}
}
-
-Deprecated: Function session_register() is deprecated in %s on line %d
-
-Deprecated: Function session_register() is deprecated in %s on line %d
-
-Deprecated: Function session_unregister() is deprecated in %s on line %d
-
-Deprecated: Function session_unregister() is deprecated in %s on line %d
values after session:
object(a)#%d (1) {
["test"]=>
@@ -78,4 +67,3 @@ object(b)#%d (1) {
string(5) "hallo"
}
}
-
diff --git a/ext/session/tests/007.phpt b/ext/session/tests/007.phpt
index 61fd0974e3..d17a1ff16e 100644
--- a/ext/session/tests/007.phpt
+++ b/ext/session/tests/007.phpt
@@ -1,11 +1,10 @@
--TEST--
bug compatibility: unset($c) with enabled register_globals
--SKIPIF--
-<?php include('skipif.inc'); ?>
+<?php include('skipif.inc'); if (PHP_VERSION_ID < 503099) { echo 'requires register_globals'; } ?>
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.bug_compat_42=1
session.serialize_handler=php
session.save_handler=files
diff --git a/ext/session/tests/008-php4.2.3.phpt b/ext/session/tests/008-php4.2.3.phpt
deleted file mode 100644
index 2b712e9bdc..0000000000
--- a/ext/session/tests/008-php4.2.3.phpt
+++ /dev/null
@@ -1,71 +0,0 @@
---TEST--
-bug compatibility: global is used albeit register_globals=0
---SKIPIF--
-<?php include('skipif.inc');
- if (version_compare(PHP_VERSION,"4.2.3-dev", "<")) die("skip this is for PHP >= 4.2.3");
-?>
---INI--
-session.use_cookies=0
-session.cache_limiter=
-register_globals=0
-session.bug_compat_42=1
-session.bug_compat_warn=1
-track_errors=1
-log_errors=0
-html_errors=0
-display_errors=1
-error_reporting=2039;
-session.serialize_handler=php
-session.save_handler=files
-precision=14
---FILE--
-<?php
-session_id("abtest");
-
-### Phase 1 cleanup
-session_start();
-session_destroy();
-
-### Phase 2 $_SESSION["c"] does not contain any value
-session_id("abtest");
-session_register("c");
-var_dump($c);
-unset($c);
-$c = 3.14;
-@session_write_close(); // this generates an E_WARNING which will be printed
-// by $php_errormsg so we can use "@" here. ANY further message IS an error.
-echo $php_errormsg."\n";
-unset($_SESSION);
-unset($c);
-
-### Phase 3 $_SESSION["c"] is set
-session_start();
-var_dump($_SESSION);
-unset($c);
-$c = 2.78;
-
-session_write_close();
-unset($_SESSION);
-unset($c);
-
-### Phase 4 final
-
-session_start();
-var_dump($c);
-var_dump($_SESSION);
-
-session_destroy();
-?>
---EXPECTF--
-NULL
-session_write_close(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively
-array(1) {
- ["c"]=>
- float(3.14)
-}
-NULL
-array(1) {
- ["c"]=>
- float(3.14)
-}
-
diff --git a/ext/session/tests/009.phpt b/ext/session/tests/009.phpt
index 17aab94a8f..02e6eb17b2 100644
--- a/ext/session/tests/009.phpt
+++ b/ext/session/tests/009.phpt
@@ -1,11 +1,10 @@
--TEST--
-unset($_SESSION["name"]); should work with register_globals=off
+unset($_SESSION["name"]); test
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=0
session.bug_compat_42=1
session.bug_compat_warn=0
session.serialize_handler=php
diff --git a/ext/session/tests/010.phpt b/ext/session/tests/010.phpt
index e1af8ce87f..9ece4e187b 100644
--- a/ext/session/tests/010.phpt
+++ b/ext/session/tests/010.phpt
@@ -5,7 +5,6 @@ $session_array = explode(";", session_encode()); should not segfault
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=0
session.bug_compat_42=1
session.bug_compat_warn=0
--FILE--
diff --git a/ext/session/tests/011.phpt b/ext/session/tests/011.phpt
index 6aaa6bd797..809ee3fd3d 100644
--- a/ext/session/tests/011.phpt
+++ b/ext/session/tests/011.phpt
@@ -5,7 +5,6 @@ session_decode(); should not segfault
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=0
session.bug_compat_42=1
session.bug_compat_warn=0
--FILE--
diff --git a/ext/session/tests/012.phpt b/ext/session/tests/012.phpt
index 32aeb29c11..4746b85be0 100644
--- a/ext/session/tests/012.phpt
+++ b/ext/session/tests/012.phpt
@@ -5,7 +5,6 @@ registering $_SESSION should not segfault
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.bug_compat_42=1
session.bug_compat_warn=0
session.serialize_handler=php
@@ -18,7 +17,7 @@ error_reporting(E_ALL);
session_id("abtest");
session_start();
-session_register("_SESSION");
+$_SESSION["_SESSION"] = Array();
$_SESSION = "kk";
session_write_close();
@@ -31,8 +30,5 @@ session_destroy();
print "I live\n";
?>
---EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
-
-Deprecated: Function session_register() is deprecated in %s on line %d
+--EXPECT--
I live
diff --git a/ext/session/tests/013.phpt b/ext/session/tests/013.phpt
index ad6c14e13e..e67a115604 100644
--- a/ext/session/tests/013.phpt
+++ b/ext/session/tests/013.phpt
@@ -5,7 +5,6 @@ redefining SID should not cause warnings
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.bug_compat_42=1
session.bug_compat_warn=0
session.serialize_handler=php
@@ -24,5 +23,4 @@ session_destroy();
print "I live\n";
?>
--EXPECT--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
I live
diff --git a/ext/session/tests/014.phpt b/ext/session/tests/014.phpt
index 4e77a7aeff..0c32dce510 100644
--- a/ext/session/tests/014.phpt
+++ b/ext/session/tests/014.phpt
@@ -3,10 +3,9 @@ a script should not be able to modify session.use_trans_sid
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
-session.use_trans_sid=1
+session.use_trans_sid=0
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.bug_compat_42=1
session.bug_compat_warn=0
session.name=PHPSESSID
@@ -22,22 +21,21 @@ session_start();
?>
<a href="/link">
<?php
-ini_set("session.use_trans_sid","0");
+ini_set("session.use_trans_sid","1");
?>
<a href="/link">
<?php
-ini_set("session.use_trans_sid","1");
+ini_set("session.use_trans_sid","0");
?>
<a href="/link">
<?php
session_destroy();
?>
--EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
-<a href="/link?PHPSESSID=abtest">
+<a href="/link">
Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d
-<a href="/link?PHPSESSID=abtest">
+<a href="/link">
Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d
-<a href="/link?PHPSESSID=abtest">
+<a href="/link">
diff --git a/ext/session/tests/019.phpt b/ext/session/tests/019.phpt
index 5bdd03b5cf..e0b8256a59 100644
--- a/ext/session/tests/019.phpt
+++ b/ext/session/tests/019.phpt
@@ -5,7 +5,6 @@ serializing references test case using globals
--INI--
session.use_cookies=0
session.cache_limiter=
-register_globals=1
session.serialize_handler=php
session.save_handler=files
--FILE--
@@ -27,27 +26,26 @@ session_id("abtest");
session_start();
session_register('o1', 'o2' );
-$o1 = new TFoo(42);
-$o2 =& $o1;
+$_SESSION["o1"] = new TFoo(42);
+$_SESSION["o2"] =& $_SESSION["o1"];
session_write_close();
-unset($o1);
-unset($o2);
+unset($_SESSION["o1"]);
+unset($_SESSION["o2"]);
session_start();
var_dump($_SESSION);
-$o1->inc();
-$o2->inc();
+$_SESSION["o1"]->inc();
+$_SESSION["o2"]->inc();
var_dump($_SESSION);
session_destroy();
?>
--EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Function session_register() is deprecated in %s on line %d
array(2) {
diff --git a/ext/session/tests/bug24592.phpt b/ext/session/tests/bug24592.phpt
index 059125ba2e..9f6c395317 100644
--- a/ext/session/tests/bug24592.phpt
+++ b/ext/session/tests/bug24592.phpt
@@ -3,7 +3,6 @@ Bug #24592 (crash when multiple NULL values are being stored)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
-register_globals=0
html_errors=0
session.save_handler=files
--FILE--
diff --git a/ext/session/tests/bug26862.phpt b/ext/session/tests/bug26862.phpt
index 44e7418cd0..7990f74359 100644
--- a/ext/session/tests/bug26862.phpt
+++ b/ext/session/tests/bug26862.phpt
@@ -3,7 +3,6 @@ Bug #26862 (ob_flush() before output_reset_rewrite_vars() results in data loss)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
-register_globals=0
html_errors=0
session.use_trans_sid=0
session.save_handler=files
diff --git a/ext/soap/TODO.old b/ext/soap/TODO.old
index a1cc15c397..59deb4b9dc 100644
--- a/ext/soap/TODO.old
+++ b/ext/soap/TODO.old
@@ -6,7 +6,6 @@ make internal refrences for soap encoding (use seralization logic)
add ini option for always soap_error_handler
provide user space overriding of serialization certin objects and types
serialization in general needs to be polished/finished... all xsd types
-make perstistant objects and work with or without register_globals on
look to see if php-soap will work with out always_populate_raw_post_data on
see if client will work with ssl.. should be eaiser with php_streams
work on soap seralizer (php serialization)
diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt
index 31bcb80fc3..c22fdd0d16 100644
--- a/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt
+++ b/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt
@@ -4,17 +4,17 @@ Test function get_cfg_var() by calling deprecated option
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
--INI--
-register_globals=1
+safe_mode=1
--SKIPIF--
<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or greater"); ?>
--FILE--
<?php
echo "*** Test by calling method or function with deprecated option ***\n";
-var_dump(get_cfg_var( 'register_globals' ) );
+var_dump(get_cfg_var( 'safe_mode' ) );
?>
--EXPECTF--
-Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in %s on line 0
+Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line 0
*** Test by calling method or function with deprecated option ***
string(1) "1"
diff --git a/ext/standard/tests/general_functions/import_request.phpt b/ext/standard/tests/general_functions/import_request.phpt
index 0f9e93bf0c..0067632391 100644
--- a/ext/standard/tests/general_functions/import_request.phpt
+++ b/ext/standard/tests/general_functions/import_request.phpt
@@ -4,8 +4,6 @@ import_request_variables() tests
a=1&b=heh&c=3&d[]=5&GLOBALS=test&1=hm
--POST--
ap=25&bp=test&cp=blah3&dp[]=ar
---INI--
-register_globals=0
--FILE--
<?php