diff options
Diffstat (limited to 'ext/session')
55 files changed, 343 insertions, 303 deletions
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index b41b742cba..977d0c0157 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -108,7 +108,7 @@ PS_OPEN_FUNC(user) PS_CLOSE_FUNC(user) { - zend_bool bailout = 0; + bool bailout = 0; STDVARS; if (!PS(mod_user_implemented)) { diff --git a/ext/session/php_session.h b/ext/session/php_session.h index c365975fb5..1a2bc9164f 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -128,8 +128,8 @@ typedef struct _php_session_rfc1867_progress { zend_long update_step; zend_long next_update; double next_update_time; - zend_bool cancel_upload; - zend_bool apply_trans_sid; + bool cancel_upload; + bool apply_trans_sid; size_t content_length; zval data; /* the array exported to session data */ @@ -148,8 +148,8 @@ typedef struct _php_ps_globals { zend_long cookie_lifetime; char *cookie_path; char *cookie_domain; - zend_bool cookie_secure; - zend_bool cookie_httponly; + bool cookie_secure; + bool cookie_httponly; char *cookie_samesite; const ps_module *mod; const ps_module *default_mod; @@ -178,10 +178,10 @@ typedef struct _php_ps_globals { int mod_user_is_open; const struct ps_serializer_struct *serializer; zval http_session_vars; - zend_bool auto_start; - zend_bool use_cookies; - zend_bool use_only_cookies; - zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ + bool auto_start; + bool use_cookies; + bool use_only_cookies; + bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ zend_long sid_length; zend_long sid_bits_per_character; @@ -189,17 +189,17 @@ typedef struct _php_ps_globals { int define_sid; php_session_rfc1867_progress *rfc1867_progress; - zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ - zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ + bool rfc1867_enabled; /* session.upload_progress.enabled */ + bool rfc1867_cleanup; /* session.upload_progress.cleanup */ char *rfc1867_prefix; /* session.upload_progress.prefix */ char *rfc1867_name; /* session.upload_progress.name */ zend_long rfc1867_freq; /* session.upload_progress.freq */ double rfc1867_min_freq; /* session.upload_progress.min_freq */ - zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ - zend_bool lazy_write; /* omit session write when it is possible */ - zend_bool in_save_handler; /* state if session is in save handler or not */ - zend_bool set_handler; /* state if session module i setting handler or not */ + bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ + bool lazy_write; /* omit session write when it is possible */ + bool in_save_handler; /* state if session is in save handler or not */ + bool set_handler; /* state if session module i setting handler or not */ zend_string *session_vars; /* serialized original session data */ } php_ps_globals; @@ -305,16 +305,12 @@ PHPAPI ZEND_EXTERN_MODULE_GLOBALS(ps) void php_session_auto_start(void *data); -#define PS_CLASS_NAME "SessionHandler" extern PHPAPI zend_class_entry *php_session_class_entry; -#define PS_IFACE_NAME "SessionHandlerInterface" extern PHPAPI zend_class_entry *php_session_iface_entry; -#define PS_SID_IFACE_NAME "SessionIdInterface" extern PHPAPI zend_class_entry *php_session_id_iface_entry; -#define PS_UPDATE_TIMESTAMP_IFACE_NAME "SessionUpdateTimestampHandlerInterface" extern PHPAPI zend_class_entry *php_session_update_timestamp_iface_entry; extern PHP_METHOD(SessionHandler, open); diff --git a/ext/session/session.c b/ext/session/session.c index a23e3a6384..f9d111768a 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -359,7 +359,7 @@ PHPAPI int php_session_valid_key(const char *key) /* {{{ */ /* }}} */ -static zend_long php_session_gc(zend_bool immediate) /* {{{ */ +static zend_long php_session_gc(bool immediate) /* {{{ */ { int nrand; zend_long num = -1; @@ -605,9 +605,9 @@ static PHP_INI_MH(OnUpdateTransSid) /* {{{ */ SESSION_CHECK_OUTPUT_STATE; if (!strncasecmp(ZSTR_VAL(new_value), "on", sizeof("on"))) { - PS(use_trans_sid) = (zend_bool) 1; + PS(use_trans_sid) = (bool) 1; } else { - PS(use_trans_sid) = (zend_bool) atoi(ZSTR_VAL(new_value)); + PS(use_trans_sid) = (bool) atoi(ZSTR_VAL(new_value)); } return SUCCESS; @@ -1430,7 +1430,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */ { int module_number = PS(module_number); zval *sid, *data, *ppid; - zend_bool apply_trans_sid; + bool apply_trans_sid; if (!PS(id)) { php_error_docref(NULL, E_WARNING, "Cannot set session ID - session ID is not initialized"); @@ -1676,8 +1676,8 @@ PHP_FUNCTION(session_set_cookie_params) HashTable *options_ht; zend_long lifetime_long; zend_string *lifetime = NULL, *path = NULL, *domain = NULL, *samesite = NULL; - zend_bool secure = 0, secure_null = 1; - zend_bool httponly = 0, httponly_null = 1; + bool secure = 0, secure_null = 1; + bool httponly = 0, httponly_null = 1; zend_string *ini_name; int result; int found = 0; @@ -1963,7 +1963,7 @@ PHP_FUNCTION(session_set_save_handler) zval *obj = NULL; zend_string *func_name; zend_function *current_mptr; - zend_bool register_shutdown = 1; + bool register_shutdown = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, php_session_iface_entry, ®ister_shutdown) == FAILURE) { RETURN_THROWS(); @@ -2186,7 +2186,7 @@ PHP_FUNCTION(session_id) /* {{{ Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session. */ PHP_FUNCTION(session_regenerate_id) { - zend_bool del_ses = 0; + bool del_ses = 0; zend_string *data; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &del_ses) == FAILURE) { @@ -2380,7 +2380,7 @@ PHP_FUNCTION(session_cache_limiter) PHP_FUNCTION(session_cache_expire) { zend_long expires; - zend_bool expires_is_null = 1; + bool expires_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &expires, &expires_is_null) == FAILURE) { RETURN_THROWS(); @@ -2688,7 +2688,7 @@ PHP_FUNCTION(session_register_shutdown) * Module Setup and Destruction * ******************************** */ -static int php_rinit_session(zend_bool auto_start) /* {{{ */ +static int php_rinit_session(bool auto_start) /* {{{ */ { php_rinit_session_globals(); @@ -2781,8 +2781,6 @@ static PHP_GINIT_FUNCTION(ps) /* {{{ */ static PHP_MINIT_FUNCTION(session) /* {{{ */ { - zend_class_entry ce; - zend_register_auto_global(zend_string_init_interned("_SESSION", sizeof("_SESSION") - 1, 1), 0, NULL); my_module_number = module_number; @@ -2798,23 +2796,14 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */ php_rfc1867_callback = php_session_rfc1867_callback; /* Register interfaces */ - INIT_CLASS_ENTRY(ce, PS_IFACE_NAME, class_SessionHandlerInterface_methods); - php_session_iface_entry = zend_register_internal_class(&ce); - php_session_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; + php_session_iface_entry = register_class_SessionHandlerInterface(); - INIT_CLASS_ENTRY(ce, PS_SID_IFACE_NAME, class_SessionIdInterface_methods); - php_session_id_iface_entry = zend_register_internal_class(&ce); - php_session_id_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; + php_session_id_iface_entry = register_class_SessionIdInterface(); - INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, class_SessionUpdateTimestampHandlerInterface_methods); - php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce); - php_session_update_timestamp_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; + php_session_update_timestamp_iface_entry = register_class_SessionUpdateTimestampHandlerInterface(); /* Register base class */ - INIT_CLASS_ENTRY(ce, PS_CLASS_NAME, class_SessionHandler_methods); - php_session_class_entry = zend_register_internal_class(&ce); - zend_class_implements(php_session_class_entry, 1, php_session_iface_entry); - zend_class_implements(php_session_class_entry, 1, php_session_id_iface_entry); + php_session_class_entry = register_class_SessionHandler(php_session_iface_entry, php_session_id_iface_entry); REGISTER_LONG_CONSTANT("PHP_SESSION_DISABLED", php_session_disabled, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PHP_SESSION_NONE", php_session_none, CONST_CS | CONST_PERSISTENT); @@ -2905,7 +2894,7 @@ static const zend_module_dep session_deps[] = { /* {{{ */ * Upload hook handling * ************************ */ -static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /* {{{ */ +static bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /* {{{ */ { zval *ppid; @@ -2940,7 +2929,7 @@ static void php_session_rfc1867_early_find_sid(php_session_rfc1867_progress *pro early_find_sid_in(&progress->sid, TRACK_VARS_GET, progress); } /* }}} */ -static zend_bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ +static bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ { zval *progress_ary, *cancel_upload; diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index d8c9b67e50..c8f7308b13 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ function session_name(?string $name = null): string|false {} diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h index 0c82feabb2..54024ca59b 100644 --- a/ext/session/session_arginfo.h +++ b/ext/session/session_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8175feea632f2832e43d830e70dc9332377b9f22 */ + * Stub hash: 84df891ffafa76a34679f4d298f1a1e91a5c23bf */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") @@ -226,3 +226,44 @@ static const zend_function_entry class_SessionHandler_methods[] = { ZEND_ME(SessionHandler, create_sid, arginfo_class_SessionHandler_create_sid, ZEND_ACC_PUBLIC) ZEND_FE_END }; + +static zend_class_entry *register_class_SessionHandlerInterface(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionHandlerInterface", class_SessionHandlerInterface_methods); + class_entry = zend_register_internal_interface(&ce); + + return class_entry; +} + +static zend_class_entry *register_class_SessionIdInterface(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionIdInterface", class_SessionIdInterface_methods); + class_entry = zend_register_internal_interface(&ce); + + return class_entry; +} + +static zend_class_entry *register_class_SessionUpdateTimestampHandlerInterface(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionUpdateTimestampHandlerInterface", class_SessionUpdateTimestampHandlerInterface_methods); + class_entry = zend_register_internal_interface(&ce); + + return class_entry; +} + +static zend_class_entry *register_class_SessionHandler(zend_class_entry *class_entry_SessionHandlerInterface, zend_class_entry *class_entry_SessionIdInterface) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionHandler", class_SessionHandler_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 2, class_entry_SessionHandlerInterface, class_entry_SessionIdInterface); + + return class_entry; +} diff --git a/ext/session/tests/003.phpt b/ext/session/tests/003.phpt index e7e4294375..4f9b37b75d 100644 --- a/ext/session/tests/003.phpt +++ b/ext/session/tests/003.phpt @@ -17,7 +17,7 @@ class foo { function method() { $this->yes++; } } -session_id("abtest"); +session_id("test003"); 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;}}'); diff --git a/ext/session/tests/004.phpt b/ext/session/tests/004.phpt index 4b81a088b2..c3ed0c5616 100644 --- a/ext/session/tests/004.phpt +++ b/ext/session/tests/004.phpt @@ -55,7 +55,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test004"); session_start(); $_SESSION["baz"]->method(); $_SESSION["arr"][3]->method(); @@ -75,7 +75,7 @@ session_destroy(); ?> --EXPECT-- OPEN: PHPSESSID -READ: abtest +READ: test004 object(foo)#2 (2) { ["bar"]=> string(2) "ok" @@ -91,9 +91,9 @@ array(1) { int(2) } } -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;}} +WRITE: test004, 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 +READ: test004 object(foo)#3 (2) { ["bar"]=> string(2) "ok" @@ -109,4 +109,4 @@ array(1) { int(2) } } -DESTROY: abtest +DESTROY: test004 diff --git a/ext/session/tests/005.phpt b/ext/session/tests/005.phpt index a7b42de7fa..2b51ceed94 100644 --- a/ext/session/tests/005.phpt +++ b/ext/session/tests/005.phpt @@ -56,7 +56,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test005"); session_start(); session_decode($hnd->data); @@ -91,7 +91,7 @@ session_destroy(); ?> --EXPECT-- OPEN: PHPSESSID -READ: abtest +READ: test005 object(foo)#4 (2) { ["bar"]=> string(2) "ok" @@ -107,10 +107,10 @@ array(1) { int(2) } } -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;}} +WRITE: test005, 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;}} CLOSE OPEN: PHPSESSID -READ: abtest +READ: test005 object(foo)#2 (2) { ["bar"]=> string(2) "ok" @@ -127,10 +127,10 @@ array(1) { } } int(123) -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; +WRITE: test005, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; CLOSE OPEN: PHPSESSID -READ: abtest +READ: test005 object(foo)#4 (2) { ["bar"]=> string(2) "ok" @@ -147,5 +147,5 @@ array(1) { } } int(123) -DESTROY: abtest +DESTROY: test005 CLOSE diff --git a/ext/session/tests/006.phpt b/ext/session/tests/006.phpt index 68cea7314a..e3c048748f 100644 --- a/ext/session/tests/006.phpt +++ b/ext/session/tests/006.phpt @@ -13,7 +13,7 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test006"); session_start(); class a { diff --git a/ext/session/tests/009.phpt b/ext/session/tests/009.phpt index 10069c21d0..898cf76a5a 100644 --- a/ext/session/tests/009.phpt +++ b/ext/session/tests/009.phpt @@ -13,14 +13,14 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test009"); ### Phase 1 cleanup session_start(); session_destroy(); ### Phase 2 $_SESSION["c"] does not contain any value -session_id("abtest"); +session_id("test009"); session_start(); var_dump($_SESSION); $_SESSION["name"] = "foo"; diff --git a/ext/session/tests/012.phpt b/ext/session/tests/012.phpt index c555d2ca1e..ad3f54962e 100644 --- a/ext/session/tests/012.phpt +++ b/ext/session/tests/012.phpt @@ -14,7 +14,7 @@ error_reporting(E_ALL); ### Absurd example, value of $_SESSION does not matter -session_id("abtest"); +session_id("test012"); session_start(); $_SESSION["_SESSION"] = Array(); $_SESSION = "kk"; diff --git a/ext/session/tests/013.phpt b/ext/session/tests/013.phpt index 32909eb58c..07fcea407b 100644 --- a/ext/session/tests/013.phpt +++ b/ext/session/tests/013.phpt @@ -12,10 +12,10 @@ session.save_handler=files <?php error_reporting(E_ALL); -session_id("abtest"); +session_id("test013"); session_start(); session_destroy(); -session_id("abtest2"); +session_id("test013-2"); session_start(); session_destroy(); diff --git a/ext/session/tests/014.phpt b/ext/session/tests/014.phpt index d8369cfec5..a0c6515243 100644 --- a/ext/session/tests/014.phpt +++ b/ext/session/tests/014.phpt @@ -14,7 +14,7 @@ session.save_handler=files <?php error_reporting(E_ALL); -session_id("abtest"); +session_id("test014"); session_start(); ?> diff --git a/ext/session/tests/015.phpt b/ext/session/tests/015.phpt index 527b86bc1d..788f1eac06 100644 --- a/ext/session/tests/015.phpt +++ b/ext/session/tests/015.phpt @@ -16,7 +16,7 @@ session.save_handler=files <?php error_reporting(E_ALL); -session_id("abtest"); +session_id("test015"); session_start(); ?> <a href="/link?<?php echo SID; ?>"> @@ -24,4 +24,4 @@ session_start(); session_destroy(); ?> --EXPECT-- -<a href="/link?PHPSESSID=abtest&PHPSESSID=abtest"> +<a href="/link?PHPSESSID=test015&PHPSESSID=test015"> diff --git a/ext/session/tests/018.phpt b/ext/session/tests/018.phpt index 5ec132b34f..d132abf717 100644 --- a/ext/session/tests/018.phpt +++ b/ext/session/tests/018.phpt @@ -16,7 +16,7 @@ session.save_handler=files error_reporting(E_ALL); -session_id("abtest"); +session_id("test018"); session_start(); ?> <form accept-charset="ISO-8859-15, ISO-8859-1" action=url.php> @@ -24,4 +24,4 @@ session_start(); session_destroy(); ?> --EXPECT-- -<form accept-charset="ISO-8859-15, ISO-8859-1" action=url.php><input type="hidden" name="PHPSESSID" value="abtest" /> +<form accept-charset="ISO-8859-15, ISO-8859-1" action=url.php><input type="hidden" name="PHPSESSID" value="test018" /> diff --git a/ext/session/tests/019.phpt b/ext/session/tests/019.phpt index d9a478245b..e3793a5522 100644 --- a/ext/session/tests/019.phpt +++ b/ext/session/tests/019.phpt @@ -23,7 +23,7 @@ class TFoo { } } -session_id("abtest"); +session_id("test019"); session_start(); $_SESSION["o1"] = new TFoo(42); diff --git a/ext/session/tests/020.phpt b/ext/session/tests/020.phpt index 267e52191c..f4ec38c8fb 100644 --- a/ext/session/tests/020.phpt +++ b/ext/session/tests/020.phpt @@ -17,7 +17,7 @@ session.save_handler=files error_reporting(E_ALL); -session_id("abtest"); +session_id("test020"); session_start(); ?> <a href="link.php?a=b"> @@ -25,4 +25,4 @@ session_start(); session_destroy(); ?> --EXPECT-- -<a href="link.php?a=b&PHPSESSID=abtest"> +<a href="link.php?a=b&PHPSESSID=test020"> diff --git a/ext/session/tests/021.phpt b/ext/session/tests/021.phpt index 4a97d7d32a..2532324fee 100644 --- a/ext/session/tests/021.phpt +++ b/ext/session/tests/021.phpt @@ -19,7 +19,7 @@ error_reporting(E_ALL); ini_set('session.trans_sid_hosts', 'php.net'); $_SERVER['HTTP_HOST'] = 'php.net'; -session_id("abtest"); +session_id("test021"); session_start(); ?> <form action="//bad.net/do.php"> @@ -60,11 +60,11 @@ session_destroy(); --EXPECT-- <form action="//bad.net/do.php"> <fieldset> -<form action="//php.net/do.php"><input type="hidden" name="PHPSESSID" value="abtest" /> +<form action="//php.net/do.php"><input type="hidden" name="PHPSESSID" value="test021" /> <fieldset> -<form action="../do.php"><input type="hidden" name="PHPSESSID" value="abtest" /> +<form action="../do.php"><input type="hidden" name="PHPSESSID" value="test021" /> <fieldset> -<form action="/do.php"><input type="hidden" name="PHPSESSID" value="abtest" /> +<form action="/do.php"><input type="hidden" name="PHPSESSID" value="test021" /> <fieldset> -<form action="/foo/do.php"><input type="hidden" name="PHPSESSID" value="abtest" /> +<form action="/foo/do.php"><input type="hidden" name="PHPSESSID" value="test021" /> <fieldset> diff --git a/ext/session/tests/023.phpt b/ext/session/tests/023.phpt index 23c7096f23..e9ce084256 100644 --- a/ext/session/tests/023.phpt +++ b/ext/session/tests/023.phpt @@ -17,7 +17,7 @@ class foo { function method() { $this->yes++; } } -session_id("abtest"); +session_id("test023"); 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 = $_SESSION['baz']; diff --git a/ext/session/tests/024.phpt b/ext/session/tests/024.phpt index 174f2e2639..913956f5b3 100644 --- a/ext/session/tests/024.phpt +++ b/ext/session/tests/024.phpt @@ -56,7 +56,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test024"); session_start(); $baz = $_SESSION['baz']; @@ -79,7 +79,7 @@ session_destroy(); ?> --EXPECTF-- OPEN: PHPSESSID -READ: abtest +READ: test024 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -95,9 +95,9 @@ array(1) { int(2) } } -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;}} +WRITE: test024, 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 +READ: test024 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -113,4 +113,4 @@ array(1) { int(2) } } -DESTROY: abtest +DESTROY: test024 diff --git a/ext/session/tests/025.phpt b/ext/session/tests/025.phpt index 172ea579c6..4e91da9796 100644 --- a/ext/session/tests/025.phpt +++ b/ext/session/tests/025.phpt @@ -57,7 +57,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test025"); session_start(); $baz = $_SESSION['baz']; $arr = $_SESSION['arr']; @@ -93,7 +93,7 @@ session_destroy(); ?> --EXPECTF-- OPEN: PHPSESSID -READ: abtest +READ: test025 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -109,10 +109,10 @@ array(1) { int(2) } } -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;}} +WRITE: test025, 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;}} CLOSE OPEN: PHPSESSID -READ: abtest +READ: test025 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -129,10 +129,10 @@ array(1) { } } int(123) -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; +WRITE: test025, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; CLOSE OPEN: PHPSESSID -READ: abtest +READ: test025 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -149,5 +149,5 @@ array(1) { } } int(123) -DESTROY: abtest +DESTROY: test025 CLOSE diff --git a/ext/session/tests/026.phpt b/ext/session/tests/026.phpt index b61039ee0c..f5abdac0a5 100644 --- a/ext/session/tests/026.phpt +++ b/ext/session/tests/026.phpt @@ -13,7 +13,7 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test026"); session_start(); class a { diff --git a/ext/session/tests/027.phpt b/ext/session/tests/027.phpt index ebaf25467c..969bc5b872 100644 --- a/ext/session/tests/027.phpt +++ b/ext/session/tests/027.phpt @@ -13,14 +13,14 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test027"); ### Phase 1 cleanup session_start(); session_destroy(); ### Phase 2 $_SESSION["c"] does not contain any value -session_id("abtest"); +session_id("test027"); session_start(); var_dump($_SESSION); $_SESSION["name"] = "foo"; diff --git a/ext/session/tests/CONFLICTS b/ext/session/tests/CONFLICTS deleted file mode 100644 index 30888ae480..0000000000 --- a/ext/session/tests/CONFLICTS +++ /dev/null @@ -1 +0,0 @@ -session diff --git a/ext/session/tests/bug41600.phpt b/ext/session/tests/bug41600.phpt index 79d5e12841..d4dfce9d88 100644 --- a/ext/session/tests/bug41600.phpt +++ b/ext/session/tests/bug41600.phpt @@ -17,7 +17,7 @@ session.save_handler=files error_reporting(E_ALL); -session_id("abtest"); +session_id("bug41600"); session_start(); ?> <a href="link.php?a=b"> @@ -25,4 +25,4 @@ session_start(); session_destroy(); ?> --EXPECT-- -<a href="link.php?a=b&PHPSESSID=abtest"> +<a href="link.php?a=b&PHPSESSID=bug41600"> diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt index f27e86387e..83567bde5f 100644 --- a/ext/session/tests/bug42596.phpt +++ b/ext/session/tests/bug42596.phpt @@ -15,7 +15,7 @@ session.serialize_handler=php session.save_handler=files --FILE-- <?php -$sessdir = __DIR__.'/sessions/'; +$sessdir = __DIR__.'/bug42596/'; @rmdir($sessdir); mkdir($sessdir); $save_path = '0;0777;'.$sessdir; diff --git a/ext/session/tests/bug69111.phpt b/ext/session/tests/bug69111.phpt index c7a6cada65..7dff0590dd 100644 --- a/ext/session/tests/bug69111.phpt +++ b/ext/session/tests/bug69111.phpt @@ -14,7 +14,7 @@ $sessionName = ini_get('session.name'); $sh->open($savePath, $sessionName); $sh->write("foo", "bar"); -var_dump($sh->read(@$id)); +var_dump($sh->read("")); ?> --EXPECTF-- Warning: SessionHandler::open(): Session is not active in %s on line 10 diff --git a/ext/session/tests/rfc1867.phpt b/ext/session/tests/rfc1867.phpt index 0e189b7aa6..a5ae8b2218 100644 --- a/ext/session/tests/rfc1867.phpt +++ b/ext/session/tests/rfc1867.phpt @@ -18,15 +18,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867 --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -50,7 +50,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt index ae5dcbe8dc..9baa6144ba 100644 --- a/ext/session/tests/rfc1867_cleanup.phpt +++ b/ext/session/tests/rfc1867_cleanup.phpt @@ -18,15 +18,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-cleanup --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-cleanup-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-cleanup-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -50,7 +50,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-cleanup" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt index 5bedb1de88..8d8effd1f4 100644 --- a/ext/session/tests/rfc1867_disabled.phpt +++ b/ext/session/tests/rfc1867_disabled.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-disabled --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-disabled-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-disabled-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="file1"; filename="file1.txt" @@ -44,7 +44,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-disabled" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt index d63748369d..c539c6eaea 100644 --- a/ext/session/tests/rfc1867_disabled_2.phpt +++ b/ext/session/tests/rfc1867_disabled_2.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-disabled-2 --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-disabled-2-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-disabled-2-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="file1"; filename="file1.txt" @@ -44,7 +44,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-disabled-2" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt index b961bbcac3..fd28dfe07a 100644 --- a/ext/session/tests/rfc1867_inter.phpt +++ b/ext/session/tests/rfc1867_inter.phpt @@ -18,15 +18,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-inter --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-inter-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-inter-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -54,7 +54,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__) . "_2"])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-inter" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt index 98e8e7cf09..15877a664e 100644 --- a/ext/session/tests/rfc1867_no_name.phpt +++ b/ext/session/tests/rfc1867_no_name.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-no-name --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-no-name-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-no-name-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="file1"; filename="file1.txt" @@ -44,7 +44,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-no-name" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt index 804a9ba308..85c28934f4 100644 --- a/ext/session/tests/rfc1867_sid_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_cookie.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-cookie --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-sid-cookie-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-cookie-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -49,7 +49,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-cookie" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt index 17d1ebce0f..dfb192cb47 100644 --- a/ext/session/tests/rfc1867_sid_get.phpt +++ b/ext/session/tests/rfc1867_sid_get.phpt @@ -17,13 +17,13 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --GET-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-get-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -47,7 +47,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-get" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt index 4b32c6e352..33e4489cc8 100644 --- a/ext/session/tests/rfc1867_sid_get_2.phpt +++ b/ext/session/tests/rfc1867_sid_get_2.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests-cookie +PHPSESSID=rfc1867-sid-get-2-cookie --GET-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-get-2 --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-get-2-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -49,7 +49,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-get-2" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_only_cookie.phpt b/ext/session/tests/rfc1867_sid_only_cookie.phpt index 0c376bb026..54897b91c8 100644 --- a/ext/session/tests/rfc1867_sid_only_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_only_cookie.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-only-cookie --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-sid-only-cookie-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-only-cookie-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -49,7 +49,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-only-cookie" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_only_cookie_2.phpt b/ext/session/tests/rfc1867_sid_only_cookie_2.phpt index 9b0aae9429..3fd46148d7 100644 --- a/ext/session/tests/rfc1867_sid_only_cookie_2.phpt +++ b/ext/session/tests/rfc1867_sid_only_cookie_2.phpt @@ -16,13 +16,13 @@ session.save_handler=files --SKIPIF-- <?php include('skipif.inc'); ?> --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-sid-only-cookie-2-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-only-cookie-2-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt index a126f9ba38..f22f153403 100644 --- a/ext/session/tests/rfc1867_sid_post.phpt +++ b/ext/session/tests/rfc1867_sid_post.phpt @@ -21,7 +21,7 @@ Content-Type: multipart/form-data; boundary=---------------------------208960602 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests +rfc1867-sid-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -45,7 +45,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-post" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/session_basic1.phpt b/ext/session/tests/session_basic1.phpt index ffdcf6c5ec..13c21d3e85 100644 --- a/ext/session/tests/session_basic1.phpt +++ b/ext/session/tests/session_basic1.phpt @@ -17,7 +17,7 @@ ob_start(); echo "*** Testing basic session functionality : variation1 ***\n"; -$session_id = 'testid'; +$session_id = 'session-basic1'; session_id($session_id); $path = __DIR__; var_dump(session_save_path($path)); @@ -47,20 +47,20 @@ ob_end_flush(); *** Testing basic session functionality : variation1 *** string(0) "" *** Without lazy_write *** -string(6) "testid" +string(14) "session-basic1" bool(true) array(1) { ["lazy_write"]=> bool(false) } bool(true) -string(6) "testid" +string(14) "session-basic1" *** With lazy_write *** -string(6) "testid" +string(14) "session-basic1" bool(true) bool(true) -string(6) "testid" +string(14) "session-basic1" *** Cleanup *** -string(6) "testid" +string(14) "session-basic1" bool(true) bool(true) diff --git a/ext/session/tests/session_basic2.phpt b/ext/session/tests/session_basic2.phpt index cb9585303c..68230f89b7 100644 --- a/ext/session/tests/session_basic2.phpt +++ b/ext/session/tests/session_basic2.phpt @@ -19,7 +19,7 @@ ob_start(); echo "*** Testing basic session functionality : variation2 ***\n"; -$session_id = 'testid'; +$session_id = 'session-basic2'; session_id($session_id); $path = __DIR__; var_dump(session_save_path($path)); @@ -55,7 +55,7 @@ ob_end_flush(); *** Testing basic session functionality : variation2 *** string(0) "" *** Without lazy_write *** -string(6) "testid" +string(14) "session-basic2" bool(true) bool(true) bool(true) diff --git a/ext/session/tests/session_basic3.phpt b/ext/session/tests/session_basic3.phpt index f6ed10e296..5f6bd72b82 100644 --- a/ext/session/tests/session_basic3.phpt +++ b/ext/session/tests/session_basic3.phpt @@ -93,7 +93,7 @@ output_reset_rewrite_vars(); echo "*** Test trans sid ***\n"; ob_start(); -$session_id = 'testid'; +$session_id = 'session-basic3'; session_id($session_id); session_start(); // Should add session ID to relative URL only for SECURITY @@ -225,39 +225,39 @@ ob_end_flush(); *** Testing basic session functionality : variation3 use_trans_sid *** *** Test trans sid *** -<a href="/?PHPSESSID=testid">test</a> -<a href="/path?PHPSESSID=testid">test</a> -<a href="/path/?PHPSESSID=testid">test</a> -<a href="/path/?foo=var&PHPSESSID=testid">test</a> -<a href="../?PHPSESSID=testid">test</a> -<a href="../path?PHPSESSID=testid">test</a> -<a href="../path/?PHPSESSID=testid">test</a> -<a href="../path/?foo=var&PHPSESSID=testid">test</a> +<a href="/?PHPSESSID=session-basic3">test</a> +<a href="/path?PHPSESSID=session-basic3">test</a> +<a href="/path/?PHPSESSID=session-basic3">test</a> +<a href="/path/?foo=var&PHPSESSID=session-basic3">test</a> +<a href="../?PHPSESSID=session-basic3">test</a> +<a href="../path?PHPSESSID=session-basic3">test</a> +<a href="../path/?PHPSESSID=session-basic3">test</a> +<a href="../path/?foo=var&PHPSESSID=session-basic3">test</a> -<a href="/?PHPSESSID=testid#bar">test</a> -<a href="/path/?PHPSESSID=testid#bar">test</a> -<a href="/path/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="../?PHPSESSID=testid#bar">test</a> -<a href="../path/?PHPSESSID=testid#bar">test</a> -<a href="../path/?foo=var&PHPSESSID=testid#bar">test</a> +<a href="/?PHPSESSID=session-basic3#bar">test</a> +<a href="/path/?PHPSESSID=session-basic3#bar">test</a> +<a href="/path/?foo=var&PHPSESSID=session-basic3#bar">test</a> +<a href="../?PHPSESSID=session-basic3#bar">test</a> +<a href="../path/?PHPSESSID=session-basic3#bar">test</a> +<a href="../path/?foo=var&PHPSESSID=session-basic3#bar">test</a> -<a href="/?foo&PHPSESSID=testid">test</a> -<a href="/?foo&PHPSESSID=testid#bar">test</a> -<a href="/?foo=var&PHPSESSID=testid">test</a> -<a href="/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="../?foo&PHPSESSID=testid">test</a> -<a href="../?foo&PHPSESSID=testid#bar">test</a> -<a href="../?foo=var&PHPSESSID=testid">test</a> -<a href="../?foo=var&PHPSESSID=testid#bar">test</a> +<a href="/?foo&PHPSESSID=session-basic3">test</a> +<a href="/?foo&PHPSESSID=session-basic3#bar">test</a> +<a href="/?foo=var&PHPSESSID=session-basic3">test</a> +<a href="/?foo=var&PHPSESSID=session-basic3#bar">test</a> +<a href="../?foo&PHPSESSID=session-basic3">test</a> +<a href="../?foo&PHPSESSID=session-basic3#bar">test</a> +<a href="../?foo=var&PHPSESSID=session-basic3">test</a> +<a href="../?foo=var&PHPSESSID=session-basic3#bar">test</a> -<a href="file.php?PHPSESSID=testid">test</a> -<a href="file.php?foo&PHPSESSID=testid">test</a> -<a href="file.php?foo=var&PHPSESSID=testid">test</a> -<a href="file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="../file.php?PHPSESSID=testid">test</a> -<a href="../file.php?foo&PHPSESSID=testid">test</a> -<a href="../file.php?foo=var&PHPSESSID=testid">test</a> -<a href="../file.php?foo=var&PHPSESSID=testid#bar">test</a> +<a href="file.php?PHPSESSID=session-basic3">test</a> +<a href="file.php?foo&PHPSESSID=session-basic3">test</a> +<a href="file.php?foo=var&PHPSESSID=session-basic3">test</a> +<a href="file.php?foo=var&PHPSESSID=session-basic3#bar">test</a> +<a href="../file.php?PHPSESSID=session-basic3">test</a> +<a href="../file.php?foo&PHPSESSID=session-basic3">test</a> +<a href="../file.php?foo=var&PHPSESSID=session-basic3">test</a> +<a href="../file.php?foo=var&PHPSESSID=session-basic3#bar">test</a> <a href="http://php.net">test</a> <a href="http://php.net/">test</a> @@ -310,19 +310,19 @@ ob_end_flush(); <a href="//php.net/some/path/file.php?foo=var">test</a> <a href="//php.net/some/path/file.php?foo=var#bar">test</a> -<form action="script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<form action="script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic3" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form action="../script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<form action="../script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic3" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form action="/path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<form action="/path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic3" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form action="../path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<form action="../path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic3" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> @@ -341,5 +341,5 @@ ob_end_flush(); bool(true) *** Cleanup *** bool(true) -string(6) "testid" +string(14) "session-basic3" bool(true) diff --git a/ext/session/tests/session_basic5.phpt b/ext/session/tests/session_basic5.phpt index 50e6cde920..6a7511c317 100644 --- a/ext/session/tests/session_basic5.phpt +++ b/ext/session/tests/session_basic5.phpt @@ -24,7 +24,7 @@ ini_set('session.trans_sid_hosts','php.net,example.com'); echo "*** Testing basic session functionality : variation5 use_trans_sid ***\n"; echo "*** Test trans sid ***\n"; -$session_id = 'testid'; +$session_id = 'session-basic5'; session_id($session_id); session_start(); // Should add session ID to allowed hosts only for SECURITY @@ -238,116 +238,116 @@ ob_end_flush(); *** Testing basic session functionality : variation5 use_trans_sid *** *** Test trans sid *** -<a href="/?PHPSESSID=testid">test</a> -<a href="/path?PHPSESSID=testid">test</a> -<a href="/path/?PHPSESSID=testid">test</a> -<a href="/path/?foo=var&PHPSESSID=testid">test</a> -<a href="../?PHPSESSID=testid">test</a> -<a href="../path?PHPSESSID=testid">test</a> -<a href="../path/?PHPSESSID=testid">test</a> -<a href="../path/?foo=var&PHPSESSID=testid">test</a> - -<a href="/?PHPSESSID=testid#bar">test</a> -<a href="/path/?PHPSESSID=testid#bar">test</a> -<a href="/path/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="../?PHPSESSID=testid#bar">test</a> -<a href="../path/?PHPSESSID=testid#bar">test</a> -<a href="../path/?foo=var&PHPSESSID=testid#bar">test</a> - -<a href="/?foo&PHPSESSID=testid">test</a> -<a href="/?foo&PHPSESSID=testid#bar">test</a> -<a href="/?foo=var&PHPSESSID=testid">test</a> -<a href="/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="../?foo&PHPSESSID=testid">test</a> -<a href="../?foo&PHPSESSID=testid#bar">test</a> -<a href="../?foo=var&PHPSESSID=testid">test</a> -<a href="../?foo=var&PHPSESSID=testid#bar">test</a> - -<a href="file.php?PHPSESSID=testid">test</a> -<a href="file.php?foo&PHPSESSID=testid">test</a> -<a href="file.php?foo=var&PHPSESSID=testid">test</a> -<a href="file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="../file.php?PHPSESSID=testid">test</a> -<a href="../file.php?foo&PHPSESSID=testid">test</a> -<a href="../file.php?foo=var&PHPSESSID=testid">test</a> -<a href="../file.php?foo=var&PHPSESSID=testid#bar">test</a> - -<a href="http://php.net/?PHPSESSID=testid">test</a> -<a href="http://php.net/?PHPSESSID=testid">test</a> -<a href="http://php.net/?PHPSESSID=testid#bar">test</a> -<a href="http://php.net/?foo&PHPSESSID=testid">test</a> -<a href="http://php.net/?foo&PHPSESSID=testid#bar">test</a> -<a href="http://php.net/?foo=var&PHPSESSID=testid">test</a> -<a href="http://php.net/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="http://php.net/file.php?PHPSESSID=testid">test</a> -<a href="http://php.net/file.php?PHPSESSID=testid#bar">test</a> -<a href="http://php.net/file.php?foo&PHPSESSID=testid">test</a> -<a href="http://php.net/file.php?foo&PHPSESSID=testid#bar">test</a> -<a href="http://php.net/file.php?foo=var&PHPSESSID=testid">test</a> -<a href="http://php.net/file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="http://php.net/some/path/file.php?PHPSESSID=testid">test</a> -<a href="http://php.net/some/path/file.php?foo&PHPSESSID=testid">test</a> -<a href="http://php.net/some/path/file.php?foo=var&PHPSESSID=testid">test</a> -<a href="http://php.net/some/path/file.php?foo=var&PHPSESSID=testid#bar">test</a> - -<a href="https://php.net/?PHPSESSID=testid">test</a> -<a href="https://php.net/?PHPSESSID=testid">test</a> -<a href="https://php.net/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="https://php.net/file.php?PHPSESSID=testid">test</a> -<a href="https://php.net/file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="https://php.net/some/path/file.php?PHPSESSID=testid">test</a> -<a href="https://php.net/some/path/file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="https://php.net:8443/?PHPSESSID=testid">test</a> -<a href="https://php.net:8443/?PHPSESSID=testid">test</a> -<a href="https://php.net:8443/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="https://php.net:8443/file.php?PHPSESSID=testid">test</a> -<a href="https://php.net:8443/file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="https://php.net:8443/some/path/file.php?PHPSESSID=testid">test</a> -<a href="https://php.net:8443/some/path/file.php?foo=var&PHPSESSID=testid#bar">test</a> - -<a href="//php.net/?PHPSESSID=testid">test</a> -<a href="//php.net/?PHPSESSID=testid">test</a> -<a href="//php.net/?PHPSESSID=testid#bar">test</a> -<a href="//php.net/?foo&PHPSESSID=testid">test</a> -<a href="//php.net/?foo&PHPSESSID=testid#bar">test</a> -<a href="//php.net/?foo=var&PHPSESSID=testid">test</a> -<a href="//php.net/?foo=var&PHPSESSID=testid#bar">test</a> -<a href="//php.net/file.php?PHPSESSID=testid">test</a> -<a href="//php.net/file.php?PHPSESSID=testid#bar">test</a> -<a href="//php.net/file.php?foo&PHPSESSID=testid">test</a> -<a href="//php.net/file.php?foo&PHPSESSID=testid#bar">test</a> -<a href="//php.net/file.php?foo=var&PHPSESSID=testid">test</a> -<a href="//php.net/file.php?foo=var&PHPSESSID=testid#bar">test</a> -<a href="//php.net/some/path/file.php?PHPSESSID=testid">test</a> -<a href="//php.net/some/path/file.php?foo&PHPSESSID=testid">test</a> -<a href="//php.net/some/path/file.php?foo=var&PHPSESSID=testid">test</a> -<a href="//php.net/some/path/file.php?foo=var&PHPSESSID=testid#bar">test</a> - -<form action="script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<a href="/?PHPSESSID=session-basic5">test</a> +<a href="/path?PHPSESSID=session-basic5">test</a> +<a href="/path/?PHPSESSID=session-basic5">test</a> +<a href="/path/?foo=var&PHPSESSID=session-basic5">test</a> +<a href="../?PHPSESSID=session-basic5">test</a> +<a href="../path?PHPSESSID=session-basic5">test</a> +<a href="../path/?PHPSESSID=session-basic5">test</a> +<a href="../path/?foo=var&PHPSESSID=session-basic5">test</a> + +<a href="/?PHPSESSID=session-basic5#bar">test</a> +<a href="/path/?PHPSESSID=session-basic5#bar">test</a> +<a href="/path/?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="../?PHPSESSID=session-basic5#bar">test</a> +<a href="../path/?PHPSESSID=session-basic5#bar">test</a> +<a href="../path/?foo=var&PHPSESSID=session-basic5#bar">test</a> + +<a href="/?foo&PHPSESSID=session-basic5">test</a> +<a href="/?foo&PHPSESSID=session-basic5#bar">test</a> +<a href="/?foo=var&PHPSESSID=session-basic5">test</a> +<a href="/?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="../?foo&PHPSESSID=session-basic5">test</a> +<a href="../?foo&PHPSESSID=session-basic5#bar">test</a> +<a href="../?foo=var&PHPSESSID=session-basic5">test</a> +<a href="../?foo=var&PHPSESSID=session-basic5#bar">test</a> + +<a href="file.php?PHPSESSID=session-basic5">test</a> +<a href="file.php?foo&PHPSESSID=session-basic5">test</a> +<a href="file.php?foo=var&PHPSESSID=session-basic5">test</a> +<a href="file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="../file.php?PHPSESSID=session-basic5">test</a> +<a href="../file.php?foo&PHPSESSID=session-basic5">test</a> +<a href="../file.php?foo=var&PHPSESSID=session-basic5">test</a> +<a href="../file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> + +<a href="http://php.net/?PHPSESSID=session-basic5">test</a> +<a href="http://php.net/?PHPSESSID=session-basic5">test</a> +<a href="http://php.net/?PHPSESSID=session-basic5#bar">test</a> +<a href="http://php.net/?foo&PHPSESSID=session-basic5">test</a> +<a href="http://php.net/?foo&PHPSESSID=session-basic5#bar">test</a> +<a href="http://php.net/?foo=var&PHPSESSID=session-basic5">test</a> +<a href="http://php.net/?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="http://php.net/file.php?PHPSESSID=session-basic5">test</a> +<a href="http://php.net/file.php?PHPSESSID=session-basic5#bar">test</a> +<a href="http://php.net/file.php?foo&PHPSESSID=session-basic5">test</a> +<a href="http://php.net/file.php?foo&PHPSESSID=session-basic5#bar">test</a> +<a href="http://php.net/file.php?foo=var&PHPSESSID=session-basic5">test</a> +<a href="http://php.net/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="http://php.net/some/path/file.php?PHPSESSID=session-basic5">test</a> +<a href="http://php.net/some/path/file.php?foo&PHPSESSID=session-basic5">test</a> +<a href="http://php.net/some/path/file.php?foo=var&PHPSESSID=session-basic5">test</a> +<a href="http://php.net/some/path/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> + +<a href="https://php.net/?PHPSESSID=session-basic5">test</a> +<a href="https://php.net/?PHPSESSID=session-basic5">test</a> +<a href="https://php.net/?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="https://php.net/file.php?PHPSESSID=session-basic5">test</a> +<a href="https://php.net/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="https://php.net/some/path/file.php?PHPSESSID=session-basic5">test</a> +<a href="https://php.net/some/path/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="https://php.net:8443/?PHPSESSID=session-basic5">test</a> +<a href="https://php.net:8443/?PHPSESSID=session-basic5">test</a> +<a href="https://php.net:8443/?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="https://php.net:8443/file.php?PHPSESSID=session-basic5">test</a> +<a href="https://php.net:8443/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="https://php.net:8443/some/path/file.php?PHPSESSID=session-basic5">test</a> +<a href="https://php.net:8443/some/path/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> + +<a href="//php.net/?PHPSESSID=session-basic5">test</a> +<a href="//php.net/?PHPSESSID=session-basic5">test</a> +<a href="//php.net/?PHPSESSID=session-basic5#bar">test</a> +<a href="//php.net/?foo&PHPSESSID=session-basic5">test</a> +<a href="//php.net/?foo&PHPSESSID=session-basic5#bar">test</a> +<a href="//php.net/?foo=var&PHPSESSID=session-basic5">test</a> +<a href="//php.net/?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="//php.net/file.php?PHPSESSID=session-basic5">test</a> +<a href="//php.net/file.php?PHPSESSID=session-basic5#bar">test</a> +<a href="//php.net/file.php?foo&PHPSESSID=session-basic5">test</a> +<a href="//php.net/file.php?foo&PHPSESSID=session-basic5#bar">test</a> +<a href="//php.net/file.php?foo=var&PHPSESSID=session-basic5">test</a> +<a href="//php.net/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> +<a href="//php.net/some/path/file.php?PHPSESSID=session-basic5">test</a> +<a href="//php.net/some/path/file.php?foo&PHPSESSID=session-basic5">test</a> +<a href="//php.net/some/path/file.php?foo=var&PHPSESSID=session-basic5">test</a> +<a href="//php.net/some/path/file.php?foo=var&PHPSESSID=session-basic5#bar">test</a> + +<form action="script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic5" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form action="../script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" />r +<form action="../script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic5" />r <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form action="/path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<form action="/path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic5" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form action="../path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /> +<form action="../path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="session-basic5" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form method="post" action="http://php.net/script.php"><input type="hidden" name="PHPSESSID" value="testid" /> +<form method="post" action="http://php.net/script.php"><input type="hidden" name="PHPSESSID" value="session-basic5" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form method="post" action="https://php.net/script.php"><input type="hidden" name="PHPSESSID" value="testid" /> +<form method="post" action="https://php.net/script.php"><input type="hidden" name="PHPSESSID" value="session-basic5" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> -<form method="post" action="//php.net/script.php"><input type="hidden" name="PHPSESSID" value="testid" /> +<form method="post" action="//php.net/script.php"><input type="hidden" name="PHPSESSID" value="session-basic5" /> <input type="text" name="test1"></input> <input type="text" name="test2" /> </form> @@ -436,5 +436,5 @@ ob_end_flush(); bool(true) *** Cleanup *** bool(true) -string(6) "testid" +string(14) "session-basic5" bool(true) diff --git a/ext/session/tests/session_commit_variation4.phpt b/ext/session/tests/session_commit_variation4.phpt index 2633f543af..b0c3ad4a94 100644 --- a/ext/session/tests/session_commit_variation4.phpt +++ b/ext/session/tests/session_commit_variation4.phpt @@ -12,7 +12,7 @@ ob_start(); echo "*** Testing session_commit() : variation ***\n"; var_dump(ini_get('session.use_strict_mode')); -var_dump(session_id("test")); +var_dump(session_id("session-commit-variation4")); var_dump(session_start()); var_dump(session_id()); var_dump(session_commit()); @@ -38,18 +38,18 @@ ob_end_flush(); string(1) "0" string(0) "" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) string(1) "0" -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) bool(true) string(1) "0" diff --git a/ext/session/tests/session_decode_variation3.phpt b/ext/session/tests/session_decode_variation3.phpt index ef4eab2bd2..2916c727f9 100644 --- a/ext/session/tests/session_decode_variation3.phpt +++ b/ext/session/tests/session_decode_variation3.phpt @@ -31,7 +31,7 @@ ob_end_flush(); Warning: session_start(): Cannot find session serialization handler "blah" - session startup failed in %s on line %d bool(false) -Warning: Undefined variable $_SESSION in %s on line %d +Warning: Undefined global variable $_SESSION in %s on line %d NULL array(3) { ["foo"]=> diff --git a/ext/session/tests/session_module_name_variation4.phpt b/ext/session/tests/session_module_name_variation4.phpt index 9b845151a8..7e58ddc6c4 100644 --- a/ext/session/tests/session_module_name_variation4.phpt +++ b/ext/session/tests/session_module_name_variation4.phpt @@ -15,6 +15,8 @@ echo "*** Testing session_module_name() : variation ***\n"; require_once "save_handler.inc"; $path = __DIR__; +$path = __DIR__ . '/session_module_name_variation4'; +@mkdir($path); session_save_path($path); session_module_name("files"); @@ -35,6 +37,7 @@ var_dump($_SESSION); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECT-- *** Testing session_module_name() : variation *** diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt index 8b3df52262..ec22e92051 100644 --- a/ext/session/tests/session_save_path_variation4.phpt +++ b/ext/session/tests/session_save_path_variation4.phpt @@ -14,7 +14,7 @@ ob_start(); echo "*** Testing session_save_path() : variation ***\n"; $initdir = __DIR__; -$sessions = ($initdir."/sessions"); +$sessions = ($initdir."/session_save_path_variation4"); chdir($initdir); @@ -38,7 +38,7 @@ ob_end_flush(); --CLEAN-- <?php $initdir = __DIR__; -$sessions = ($initdir."/sessions"); +$sessions = ($initdir."/session_save_path_variation4"); var_dump(rmdir($sessions)); ?> --EXPECTF-- diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt index 446a472ab4..3977d0deab 100644 --- a/ext/session/tests/session_save_path_variation5.phpt +++ b/ext/session/tests/session_save_path_variation5.phpt @@ -15,7 +15,7 @@ session.name=PHPSESSID ob_start(); echo "*** Testing session_save_path() : variation ***\n"; $directory = __DIR__; -$sessions = ($directory."/sessions"); +$sessions = ($directory."/session_save_path_variation5"); chdir($directory); ini_set('open_basedir', '.'); @@ -36,7 +36,7 @@ ob_end_flush(); --CLEAN-- <?php $directory = __DIR__; -$sessions = ($directory."/sessions"); +$sessions = ($directory."/session_save_path_variation5"); var_dump(rmdir($sessions)); ?> --EXPECTF-- diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt index 459f03c825..23865aa512 100644 --- a/ext/session/tests/session_set_save_handler_basic.phpt +++ b/ext/session/tests/session_set_save_handler_basic.phpt @@ -20,7 +20,8 @@ var_dump(session_module_name(FALSE)); var_dump(session_module_name("blah")); var_dump(session_module_name("foo")); -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_basic'; +@mkdir($path); session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "gc"); @@ -55,6 +56,7 @@ session_start(); session_destroy(); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : basic functionality *** diff --git a/ext/session/tests/session_set_save_handler_class_012.phpt b/ext/session/tests/session_set_save_handler_class_012.phpt index 0849013a8f..2d55715544 100644 --- a/ext/session/tests/session_set_save_handler_class_012.phpt +++ b/ext/session/tests/session_set_save_handler_class_012.phpt @@ -45,7 +45,7 @@ var_dump(session_id(), $oldHandler, ini_get('session.save_handler'), $handler->i Open SessionHandler::open() expects exactly 2 arguments, 0 given -Warning: Undefined variable $_SESSION in %s on line %d +Warning: Undefined global variable $_SESSION in %s on line %d string(0) "" string(5) "files" string(4) "user" diff --git a/ext/session/tests/session_set_save_handler_variation2.phpt b/ext/session/tests/session_set_save_handler_variation2.phpt index 224846466e..a4b7d4df6e 100644 --- a/ext/session/tests/session_set_save_handler_variation2.phpt +++ b/ext/session/tests/session_set_save_handler_variation2.phpt @@ -10,13 +10,15 @@ ob_start(); echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation2'; +@mkdir($path); session_save_path($path); var_dump(session_start()); var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc")); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** diff --git a/ext/session/tests/session_set_save_handler_variation3.phpt b/ext/session/tests/session_set_save_handler_variation3.phpt index be825cbe72..cc0ae1fb23 100644 --- a/ext/session/tests/session_set_save_handler_variation3.phpt +++ b/ext/session/tests/session_set_save_handler_variation3.phpt @@ -12,13 +12,15 @@ ob_start(); echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation3'; +@mkdir($path); var_dump(session_status()); session_save_path($path); var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc")); var_dump(session_destroy()); - ob_end_flush(); + +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** diff --git a/ext/session/tests/session_set_save_handler_variation4.phpt b/ext/session/tests/session_set_save_handler_variation4.phpt index e1b61f29a7..9930f7aaf2 100644 --- a/ext/session/tests/session_set_save_handler_variation4.phpt +++ b/ext/session/tests/session_set_save_handler_variation4.phpt @@ -23,7 +23,8 @@ function noisy_gc($maxlifetime) { } require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation4'; +@mkdir($path); session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "noisy_gc"); @@ -42,13 +43,14 @@ var_dump($_SESSION); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** Open [%s,PHPSESSID] Read [%s,%s] GC [0] -2 deleted +1 deleted array(3) { ["Blah"]=> string(12) "Hello World!" diff --git a/ext/session/tests/session_set_save_handler_variation5.phpt b/ext/session/tests/session_set_save_handler_variation5.phpt index 9860dcc04a..7cf7814259 100644 --- a/ext/session/tests/session_set_save_handler_variation5.phpt +++ b/ext/session/tests/session_set_save_handler_variation5.phpt @@ -24,7 +24,8 @@ function noisy_gc($maxlifetime) { echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation5'; +@mkdir($path); var_dump(session_save_path($path)); echo "*** Without lazy_write ***\n"; @@ -48,6 +49,7 @@ var_dump(session_start()); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** diff --git a/ext/session/tests/session_set_save_handler_variation6.phpt b/ext/session/tests/session_set_save_handler_variation6.phpt index d65c0dc1c8..11af07f603 100644 --- a/ext/session/tests/session_set_save_handler_variation6.phpt +++ b/ext/session/tests/session_set_save_handler_variation6.phpt @@ -17,7 +17,8 @@ ob_start(); echo "*** Testing session_set_save_handler() : test write short circuit ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation6'; +@mkdir($path); session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "gc", "create_sid", "validate_sid", "update"); @@ -53,6 +54,7 @@ session_start(); session_destroy(); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : test write short circuit *** |
