diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-21 01:27:22 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-21 01:27:22 +0000 |
commit | febee112850af0e56a57e2b38c9043c07dc99465 (patch) | |
tree | 42888ff0eb0f99d65dddeea4b1b0f5e161906ee0 /ext/session/tests/008-php4.2.3.phpt | |
parent | bae9248602dc16b90db44473c903fbf539793aa7 (diff) | |
download | php-git-febee112850af0e56a57e2b38c9043c07dc99465.tar.gz |
Removed register_globals
Diffstat (limited to 'ext/session/tests/008-php4.2.3.phpt')
-rw-r--r-- | ext/session/tests/008-php4.2.3.phpt | 71 |
1 files changed, 0 insertions, 71 deletions
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) -} - |