Lines Matching refs:PS
87 if (Z_ISREF_P(&PS(http_session_vars)) && Z_TYPE_P(Z_REFVAL(PS(http_session_vars))) == IS_ARRAY)
90 if (PS(session_status) == php_session_active) { \
101 #define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies))
114 PS(id) = NULL; in php_rinit_session_globals()
115 PS(session_status) = php_session_none; in php_rinit_session_globals()
116 PS(in_save_handler) = 0; in php_rinit_session_globals()
117 PS(set_handler) = 0; in php_rinit_session_globals()
118 PS(mod_data) = NULL; in php_rinit_session_globals()
119 PS(mod_user_is_open) = 0; in php_rinit_session_globals()
120 PS(define_sid) = 1; in php_rinit_session_globals()
121 PS(session_vars) = NULL; in php_rinit_session_globals()
122 PS(module_number) = my_module_number; in php_rinit_session_globals()
123 ZVAL_UNDEF(&PS(http_session_vars)); in php_rinit_session_globals()
131 if (!Z_ISUNDEF(PS(http_session_vars))) { in php_rshutdown_session_globals()
132 zval_ptr_dtor(&PS(http_session_vars)); in php_rshutdown_session_globals()
133 ZVAL_UNDEF(&PS(http_session_vars)); in php_rshutdown_session_globals()
135 if (PS(mod_data) || PS(mod_user_implemented)) { in php_rshutdown_session_globals()
137 PS(mod)->s_close(&PS(mod_data)); in php_rshutdown_session_globals()
140 if (PS(id)) { in php_rshutdown_session_globals()
141 zend_string_release_ex(PS(id), 0); in php_rshutdown_session_globals()
142 PS(id) = NULL; in php_rshutdown_session_globals()
145 if (PS(session_vars)) { in php_rshutdown_session_globals()
146 zend_string_release_ex(PS(session_vars), 0); in php_rshutdown_session_globals()
147 PS(session_vars) = NULL; in php_rshutdown_session_globals()
152 PS(session_status) = php_session_none; in php_rshutdown_session_globals()
160 if (PS(session_status) != php_session_active) { in php_session_destroy()
165 if (PS(id) && PS(mod)->s_destroy(&PS(mod_data), PS(id)) == FAILURE) { in php_session_destroy()
180 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_add_session_var()
194 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_set_session_var()
205 return zend_hash_find(Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))), name); in php_get_session_var()
218 if (!Z_ISUNDEF(PS(http_session_vars))) { in php_session_track_init()
219 zval_ptr_dtor(&PS(http_session_vars)); in php_session_track_init()
223 ZVAL_NEW_REF(&PS(http_session_vars), &session_vars); in php_session_track_init()
224 Z_ADDREF_P(&PS(http_session_vars)); in php_session_track_init()
225 zend_hash_update_ind(&EG(symbol_table), var_name, &PS(http_session_vars)); in php_session_track_init()
233 if (!PS(serializer)) { in php_session_encode()
237 return PS(serializer)->encode(); in php_session_encode()
247 if (!PS(serializer)) { in php_session_decode()
251 if (PS(serializer)->decode(ZSTR_VAL(data), ZSTR_LEN(data)) == FAILURE) { in php_session_decode()
315 if (php_random_bytes_throw(rbuf, PS(sid_length) + PS_EXTRA_RAND_BYTES) == FAILURE) { in php_session_create_id()
319 outid = zend_string_alloc(PS(sid_length), 0); in php_session_create_id()
321 rbuf, PS(sid_length), in php_session_create_id()
323 (char)PS(sid_bits_per_character)); in php_session_create_id()
370 if ((PS(mod_data) || PS(mod_user_implemented))) { in php_session_gc()
372 PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &num); in php_session_gc()
375 nrand = (zend_long) ((float) PS(gc_divisor) * php_combined_lcg()); in php_session_gc()
376 if (PS(gc_probability) > 0 && nrand < PS(gc_probability)) { in php_session_gc()
377 PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &num); in php_session_gc()
387 PS(session_status) = php_session_active; in php_session_initialize()
389 if (!PS(mod)) { in php_session_initialize()
390 PS(session_status) = php_session_disabled; in php_session_initialize()
396 if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE in php_session_initialize()
400 …, E_WARNING, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in php_session_initialize()
405 if (!PS(id) || !ZSTR_VAL(PS(id))[0]) { in php_session_initialize()
406 if (PS(id)) { in php_session_initialize()
407 zend_string_release_ex(PS(id), 0); in php_session_initialize()
409 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in php_session_initialize()
410 if (!PS(id)) { in php_session_initialize()
412 …zend_throw_error(NULL, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path… in php_session_initialize()
415 if (PS(use_cookies)) { in php_session_initialize()
416 PS(send_cookie) = 1; in php_session_initialize()
418 } else if (PS(use_strict_mode) && PS(mod)->s_validate_sid && in php_session_initialize()
419 PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == FAILURE) { in php_session_initialize()
420 if (PS(id)) { in php_session_initialize()
421 zend_string_release_ex(PS(id), 0); in php_session_initialize()
423 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in php_session_initialize()
424 if (!PS(id)) { in php_session_initialize()
425 PS(id) = php_session_create_id(NULL); in php_session_initialize()
427 if (PS(use_cookies)) { in php_session_initialize()
428 PS(send_cookie) = 1; in php_session_initialize()
439 if (PS(mod)->s_read(&PS(mod_data), PS(id), &val, PS(gc_maxlifetime)) == FAILURE) { in php_session_initialize()
442 …ref(NULL, E_WARNING, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in php_session_initialize()
449 if (PS(session_vars)) { in php_session_initialize()
450 zend_string_release_ex(PS(session_vars), 0); in php_session_initialize()
451 PS(session_vars) = NULL; in php_session_initialize()
454 if (PS(lazy_write)) { in php_session_initialize()
455 PS(session_vars) = zend_string_copy(val); in php_session_initialize()
470 if (PS(mod_data) || PS(mod_user_implemented)) { in php_session_save_current_state()
475 if (PS(lazy_write) && PS(session_vars) in php_session_save_current_state()
476 && PS(mod)->s_update_timestamp in php_session_save_current_state()
477 && PS(mod)->s_update_timestamp != php_session_update_timestamp in php_session_save_current_state()
478 && ZSTR_LEN(val) == ZSTR_LEN(PS(session_vars)) in php_session_save_current_state()
479 && !memcmp(ZSTR_VAL(val), ZSTR_VAL(PS(session_vars)), ZSTR_LEN(val)) in php_session_save_current_state()
481 ret = PS(mod)->s_update_timestamp(&PS(mod_data), PS(id), val, PS(gc_maxlifetime)); in php_session_save_current_state()
483 ret = PS(mod)->s_write(&PS(mod_data), PS(id), val, PS(gc_maxlifetime)); in php_session_save_current_state()
487 ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime)); in php_session_save_current_state()
492 if (!PS(mod_user_implemented)) { in php_session_save_current_state()
496 PS(mod)->s_name, in php_session_save_current_state()
497 PS(save_path)); in php_session_save_current_state()
500 "defined save handler. (session.save_path: %s)", PS(save_path)); in php_session_save_current_state()
506 if (PS(mod_data) || PS(mod_user_implemented)) { in php_session_save_current_state()
507 PS(mod)->s_close(&PS(mod_data)); in php_session_save_current_state()
559 if (!PS(set_handler) && tmp == ps_user_ptr) { in PHP_INI_MH()
564 PS(default_mod) = PS(mod); in PHP_INI_MH()
565 PS(mod) = tmp; in PHP_INI_MH()
595 PS(serializer) = tmp; in PHP_INI_MH()
607 PS(use_trans_sid) = (zend_bool) 1; in PHP_INI_MH()
609 PS(use_trans_sid) = (zend_bool) atoi(ZSTR_VAL(new_value)); in PHP_INI_MH()
729 PS(sid_length) = val; in PHP_INI_MH()
749 PS(sid_bits_per_character) = val; in PHP_INI_MH()
782 PS(rfc1867_freq) = -tmp; in PHP_INI_MH()
784 PS(rfc1867_freq) = tmp; in PHP_INI_MH()
845 php_var_serialize(&buf, Z_REFVAL(PS(http_session_vars)), &var_hash); in PHP_INI_END()
870 if (!Z_ISUNDEF(PS(http_session_vars))) { in PS_SERIALIZER_DECODE_FUNC()
871 zval_ptr_dtor(&PS(http_session_vars)); in PS_SERIALIZER_DECODE_FUNC()
876 ZVAL_NEW_REF(&PS(http_session_vars), &session_vars); in PS_SERIALIZER_DECODE_FUNC()
877 Z_ADDREF_P(&PS(http_session_vars)); in PS_SERIALIZER_DECODE_FUNC()
878 zend_hash_update_ind(&EG(symbol_table), var_name, &PS(http_session_vars)); in PS_SERIALIZER_DECODE_FUNC()
1168 now = tv.tv_sec + PS(cache_expire) * 60; in CACHE_LIMITER_FUNC()
1173 …snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=" ZEND_LONG_FMT, PS(cache_expire) * 60… in CACHE_LIMITER_FUNC()
1184 …snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=" ZEND_LONG_FMT, PS(cache_expire) * 60… in CACHE_LIMITER_FUNC()
1222 if (PS(cache_limiter)[0] == '\0') return 0; in php_session_cache_limiter()
1223 if (PS(session_status) != php_session_active) return -1; in php_session_cache_limiter()
1239 if (!strcasecmp(lim->name, PS(cache_limiter))) { in php_session_cache_limiter()
1268 e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name))); in php_session_remove_cookie()
1317 e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name))); in php_session_send_cookie()
1318 e_id = php_url_encode(ZSTR_VAL(PS(id)), ZSTR_LEN(PS(id))); in php_session_send_cookie()
1328 if (PS(cookie_lifetime) > 0) { in php_session_send_cookie()
1333 t = tv.tv_sec + PS(cookie_lifetime); in php_session_send_cookie()
1342 smart_str_append_long(&ncookie, PS(cookie_lifetime)); in php_session_send_cookie()
1346 if (PS(cookie_path)[0]) { in php_session_send_cookie()
1348 smart_str_appends(&ncookie, PS(cookie_path)); in php_session_send_cookie()
1351 if (PS(cookie_domain)[0]) { in php_session_send_cookie()
1353 smart_str_appends(&ncookie, PS(cookie_domain)); in php_session_send_cookie()
1356 if (PS(cookie_secure)) { in php_session_send_cookie()
1360 if (PS(cookie_httponly)) { in php_session_send_cookie()
1364 if (PS(cookie_samesite)[0]) { in php_session_send_cookie()
1366 smart_str_appends(&ncookie, PS(cookie_samesite)); in php_session_send_cookie()
1415 PS(id) = zend_string_init(Z_STRVAL_P(ppid), Z_STRLEN_P(ppid), 0); in ppid2sid()
1416 PS(send_cookie) = 0; in ppid2sid()
1418 PS(id) = NULL; in ppid2sid()
1419 PS(send_cookie) = 1; in ppid2sid()
1426 int module_number = PS(module_number); in php_session_reset_id()
1430 if (!PS(id)) { in php_session_reset_id()
1435 if (PS(use_cookies) && PS(send_cookie)) { in php_session_reset_id()
1437 PS(send_cookie) = 0; in php_session_reset_id()
1445 if (PS(define_sid)) { in php_session_reset_id()
1448 smart_str_appends(&var, PS(session_name)); in php_session_reset_id()
1450 smart_str_appends(&var, ZSTR_VAL(PS(id))); in php_session_reset_id()
1472 if (PS(use_cookies) && in php_session_reset_id()
1476 (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), strlen(PS(session_name))))) { in php_session_reset_id()
1484 sname = zend_string_init(PS(session_name), strlen(PS(session_name)), 0); in php_session_reset_id()
1487 …php_url_scanner_add_session_var(PS(session_name), strlen(PS(session_name)), ZSTR_VAL(PS(id)), ZSTR… in php_session_reset_id()
1501 switch (PS(session_status)) { in php_session_start()
1509 if (!PS(mod) && value) { in php_session_start()
1510 PS(mod) = _php_find_ps_module(value); in php_session_start()
1511 if (!PS(mod)) { in php_session_start()
1517 if (!PS(serializer) && value) { in php_session_start()
1518 PS(serializer) = _php_find_ps_serializer(value); in php_session_start()
1519 if (!PS(serializer)) { in php_session_start()
1524 PS(session_status) = php_session_none; in php_session_start()
1530 PS(define_sid) = !PS(use_only_cookies); /* SID constant is defined when non-cookie ID is used */ in php_session_start()
1531 PS(send_cookie) = PS(use_cookies) || PS(use_only_cookies); in php_session_start()
1534 lensess = strlen(PS(session_name)); in php_session_start()
1544 if (!PS(id)) { in php_session_start()
1545 …if (PS(use_cookies) && (data = zend_hash_str_find(&EG(symbol_table), "_COOKIE", sizeof("_COOKIE") … in php_session_start()
1547 …if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), l… in php_session_start()
1549 PS(send_cookie) = 0; in php_session_start()
1550 PS(define_sid) = 0; in php_session_start()
1554 if (!PS(use_only_cookies)) { in php_session_start()
1555 if (!PS(id) && (data = zend_hash_str_find(&EG(symbol_table), "_GET", sizeof("_GET") - 1))) { in php_session_start()
1557 …if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), l… in php_session_start()
1561 if (!PS(id) && (data = zend_hash_str_find(&EG(symbol_table), "_POST", sizeof("_POST") - 1))) { in php_session_start()
1563 …if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), l… in php_session_start()
1570 if (!PS(id) && zend_is_auto_global_str("_SERVER", sizeof("_SERVER") - 1) == SUCCESS && in php_session_start()
1573 (p = strstr(Z_STRVAL_P(data), PS(session_name))) && in php_session_start()
1579 PS(id) = zend_string_init(p, q - p, 0); in php_session_start()
1584 if (PS(id) && PS(extern_referer_chk)[0] != '\0' && in php_session_start()
1589 strstr(Z_STRVAL_P(data), PS(extern_referer_chk)) == NULL in php_session_start()
1591 zend_string_release_ex(PS(id), 0); in php_session_start()
1592 PS(id) = NULL; in php_session_start()
1599 if (PS(id) && strpbrk(ZSTR_VAL(PS(id)), "\r\n\t <>'\"\\")) { in php_session_start()
1600 zend_string_release_ex(PS(id), 0); in php_session_start()
1601 PS(id) = NULL; in php_session_start()
1606 PS(session_status) = php_session_none; in php_session_start()
1607 if (PS(id)) { in php_session_start()
1608 zend_string_release_ex(PS(id), 0); in php_session_start()
1609 PS(id) = NULL; in php_session_start()
1619 if (PS(session_status) == php_session_active) { in php_session_flush()
1621 PS(session_status) = php_session_none; in php_session_flush()
1630 if (PS(session_status) == php_session_active) { in php_session_abort()
1631 if (PS(mod_data) || PS(mod_user_implemented)) { in php_session_abort()
1632 PS(mod)->s_close(&PS(mod_data)); in php_session_abort()
1634 PS(session_status) = php_session_none; in php_session_abort()
1643 if (PS(session_status) == php_session_active in php_session_reset()
1657 if (APPLY_TRANS_SID && (PS(session_status) == php_session_active)) { in session_adapt_url()
1658 …*new = php_url_scanner_adapt_single_url(url, urllen, PS(session_name), ZSTR_VAL(PS(id)), newlen, 1… in session_adapt_url()
1680 if (!PS(use_cookies)) { in PHP_FUNCTION()
1693 if (PS(session_status) == php_session_active) { in PHP_FUNCTION()
1828 add_assoc_long(return_value, "lifetime", PS(cookie_lifetime)); in PHP_FUNCTION()
1829 add_assoc_string(return_value, "path", PS(cookie_path)); in PHP_FUNCTION()
1830 add_assoc_string(return_value, "domain", PS(cookie_domain)); in PHP_FUNCTION()
1831 add_assoc_bool(return_value, "secure", PS(cookie_secure)); in PHP_FUNCTION()
1832 add_assoc_bool(return_value, "httponly", PS(cookie_httponly)); in PHP_FUNCTION()
1833 add_assoc_string(return_value, "samesite", PS(cookie_samesite)); in PHP_FUNCTION()
1848 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
1858 RETVAL_STRING(PS(session_name)); in PHP_FUNCTION()
1879 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
1890 if (PS(mod) && PS(mod)->s_name) { in PHP_FUNCTION()
1891 RETVAL_STRING(PS(mod)->s_name); in PHP_FUNCTION()
1903 if (PS(mod_data) || PS(mod_user_implemented)) { in PHP_FUNCTION()
1904 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
1906 PS(mod_data) = NULL; in PHP_FUNCTION()
1923 if (PS(session_status) == php_session_active) { in PHP_FUNCTION()
1948 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1949 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1952 array_init_size(&PS(mod_user_names).names[i], 2); in PHP_FUNCTION()
1954 add_next_index_zval(&PS(mod_user_names).names[i], obj); in PHP_FUNCTION()
1955 add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); in PHP_FUNCTION()
1967 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1968 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1970 array_init_size(&PS(mod_user_names).names[i], 2); in PHP_FUNCTION()
1972 add_next_index_zval(&PS(mod_user_names).names[i], obj); in PHP_FUNCTION()
1973 add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); in PHP_FUNCTION()
1975 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1976 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1977 ZVAL_UNDEF(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1987 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1988 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1990 array_init_size(&PS(mod_user_names).names[i], 2); in PHP_FUNCTION()
1992 add_next_index_zval(&PS(mod_user_names).names[i], obj); in PHP_FUNCTION()
1993 add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); in PHP_FUNCTION()
1995 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1996 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1997 ZVAL_UNDEF(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
2023 if (PS(mod) && PS(session_status) != php_session_active && PS(mod) != &ps_mod_user) { in PHP_FUNCTION()
2026 PS(set_handler) = 1; in PHP_FUNCTION()
2028 PS(set_handler) = 0; in PHP_FUNCTION()
2058 if (PS(mod) && PS(mod) != &ps_mod_user) { in PHP_FUNCTION()
2061 PS(set_handler) = 1; in PHP_FUNCTION()
2063 PS(set_handler) = 0; in PHP_FUNCTION()
2069 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
2070 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
2072 ZVAL_COPY(&PS(mod_user_names).names[i], &args[i]); in PHP_FUNCTION()
2090 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2100 RETVAL_STRING(PS(save_path)); in PHP_FUNCTION()
2126 if (name && PS(use_cookies) && SG(headers_sent)) { in PHP_FUNCTION()
2131 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2136 if (PS(id)) { in PHP_FUNCTION()
2139 size_t len = strlen(ZSTR_VAL(PS(id))); in PHP_FUNCTION()
2140 if (UNEXPECTED(len != ZSTR_LEN(PS(id)))) { in PHP_FUNCTION()
2141 RETVAL_NEW_STR(zend_string_init(ZSTR_VAL(PS(id)), len, 0)); in PHP_FUNCTION()
2143 RETVAL_STR_COPY(PS(id)); in PHP_FUNCTION()
2150 if (PS(id)) { in PHP_FUNCTION()
2151 zend_string_release_ex(PS(id), 0); in PHP_FUNCTION()
2153 PS(id) = zend_string_copy(name); in PHP_FUNCTION()
2169 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2181 if (PS(mod)->s_destroy(&PS(mod_data), PS(id)) == FAILURE) { in PHP_FUNCTION()
2182 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2183 PS(session_status) = php_session_none; in PHP_FUNCTION()
2184 …_WARNING, "Session object destruction failed. ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in PHP_FUNCTION()
2191 ret = PS(mod)->s_write(&PS(mod_data), PS(id), data, PS(gc_maxlifetime)); in PHP_FUNCTION()
2194 ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime)); in PHP_FUNCTION()
2197 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2198 PS(session_status) = php_session_none; in PHP_FUNCTION()
2199 …php_error_docref(NULL, E_WARNING, "Session write failed. ID: %s (path: %s)", PS(mod)->s_name, PS(s… in PHP_FUNCTION()
2203 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2206 if (PS(session_vars)) { in PHP_FUNCTION()
2207 zend_string_release_ex(PS(session_vars), 0); in PHP_FUNCTION()
2208 PS(session_vars) = NULL; in PHP_FUNCTION()
2210 zend_string_release_ex(PS(id), 0); in PHP_FUNCTION()
2211 PS(id) = NULL; in PHP_FUNCTION()
2213 if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE) { in PHP_FUNCTION()
2214 PS(session_status) = php_session_none; in PHP_FUNCTION()
2215 zend_throw_error(NULL, "Failed to open session: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in PHP_FUNCTION()
2219 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in PHP_FUNCTION()
2220 if (!PS(id)) { in PHP_FUNCTION()
2221 PS(session_status) = php_session_none; in PHP_FUNCTION()
2222 …zend_throw_error(NULL, "Failed to create new session ID: %s (path: %s)", PS(mod)->s_name, PS(save_… in PHP_FUNCTION()
2225 if (PS(use_strict_mode) && PS(mod)->s_validate_sid && in PHP_FUNCTION()
2226 PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == SUCCESS) { in PHP_FUNCTION()
2227 zend_string_release_ex(PS(id), 0); in PHP_FUNCTION()
2228 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in PHP_FUNCTION()
2229 if (!PS(id)) { in PHP_FUNCTION()
2230 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2231 PS(session_status) = php_session_none; in PHP_FUNCTION()
2232 …r(NULL, "Failed to create session ID by collision: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in PHP_FUNCTION()
2237 if (PS(mod)->s_read(&PS(mod_data), PS(id), &data, PS(gc_maxlifetime)) == FAILURE) { in PHP_FUNCTION()
2238 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2239 PS(session_status) = php_session_none; in PHP_FUNCTION()
2240 …zend_throw_error(NULL, "Failed to create(read) session ID: %s (path: %s)", PS(mod)->s_name, PS(sav… in PHP_FUNCTION()
2247 if (PS(use_cookies)) { in PHP_FUNCTION()
2248 PS(send_cookie) = 1; in PHP_FUNCTION()
2280 if (!PS(in_save_handler) && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2283 new_id = PS(mod)->s_create_sid(&PS(mod_data)); in PHP_FUNCTION()
2284 if (!PS(mod)->s_validate_sid) { in PHP_FUNCTION()
2288 if (PS(mod)->s_validate_sid(&PS(mod_data), new_id) == SUCCESS) { in PHP_FUNCTION()
2324 if (limiter && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2334 RETVAL_STRING(PS(cache_limiter)); in PHP_FUNCTION()
2355 if (expires && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2357 RETURN_LONG(PS(cache_expire)); in PHP_FUNCTION()
2365 RETVAL_LONG(PS(cache_expire)); in PHP_FUNCTION()
2405 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2443 if (PS(session_status) == php_session_active) { in PHP_FUNCTION()
2453 if (PS(use_cookies) && SG(headers_sent)) { in PHP_FUNCTION()
2489 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2491 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in PHP_FUNCTION()
2527 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2532 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in PHP_FUNCTION()
2552 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2575 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2591 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2607 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2623 RETURN_LONG(PS(session_status)); in PHP_FUNCTION()
2845 if (PS(mod) == NULL) { in php_rinit_session()
2850 PS(mod) = _php_find_ps_module(value); in php_rinit_session()
2854 if (PS(serializer) == NULL) { in php_rinit_session()
2859 PS(serializer) = _php_find_ps_serializer(value); in php_rinit_session()
2863 if (PS(mod) == NULL || PS(serializer) == NULL) { in php_rinit_session()
2865 PS(session_status) = php_session_disabled; in php_rinit_session()
2878 return php_rinit_session(PS(auto_start)); in PHP_RINIT_FUNCTION()
2886 if (PS(session_status) == php_session_active) { in PHP_RSHUTDOWN_FUNCTION()
2895 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_RSHUTDOWN_FUNCTION()
2896 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_RSHUTDOWN_FUNCTION()
2897 ZVAL_UNDEF(&PS(mod_user_names).names[i]); in PHP_RSHUTDOWN_FUNCTION()
2939 PS(module_number) = module_number; in PHP_MINIT_FUNCTION()
2941 PS(session_status) = php_session_none; in PHP_MINIT_FUNCTION()
3066 …if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name), progress->snam… in early_find_sid_in()
3079 if (PS(use_cookies)) { in php_session_rfc1867_early_find_sid()
3086 if (PS(use_only_cookies)) { in php_session_rfc1867_early_find_sid()
3097 …if ((progress_ary = zend_symtable_find(Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))), progress->key.… in php_check_cancel_upload()
3116 if (PS(rfc1867_min_freq) > 0.0) { in php_session_rfc1867_update()
3124 progress->next_update_time = dtv + PS(rfc1867_min_freq); in php_session_rfc1867_update()
3131 PS(session_status) = php_session_active; in php_session_rfc1867_update()
3133 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_session_rfc1867_update()
3146 PS(session_status) = php_session_active; in php_session_rfc1867_cleanup()
3148 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_session_rfc1867_cleanup()
3163 if (!PS(rfc1867_enabled)) { in php_session_rfc1867_callback()
3167 progress = PS(rfc1867_progress); in php_session_rfc1867_callback()
3174 progress->sname_len = strlen(PS(session_name)); in php_session_rfc1867_callback()
3175 PS(rfc1867_progress) = progress; in php_session_rfc1867_callback()
3196 if (name_len == progress->sname_len && memcmp(data->name, PS(session_name), name_len) == 0) { in php_session_rfc1867_callback()
3199 …} else if (name_len == strlen(PS(rfc1867_name)) && memcmp(data->name, PS(rfc1867_name), name_len +… in php_session_rfc1867_callback()
3201 smart_str_appends(&progress->key, PS(rfc1867_prefix)); in php_session_rfc1867_callback()
3223 if (PS(rfc1867_freq) >= 0) { in php_session_rfc1867_callback()
3224 progress->update_step = PS(rfc1867_freq); in php_session_rfc1867_callback()
3225 } else if (PS(rfc1867_freq) < 0) { /* % of total size */ in php_session_rfc1867_callback()
3226 progress->update_step = progress->content_length * -PS(rfc1867_freq) / 100; in php_session_rfc1867_callback()
3243 PS(id) = zend_string_init(Z_STRVAL(progress->sid), Z_STRLEN(progress->sid), 0); in php_session_rfc1867_callback()
3246 PS(use_trans_sid) = 1; in php_session_rfc1867_callback()
3247 PS(use_only_cookies) = 0; in php_session_rfc1867_callback()
3249 PS(send_cookie) = 0; in php_session_rfc1867_callback()
3308 if (PS(rfc1867_cleanup)) { in php_session_rfc1867_callback()
3328 PS(rfc1867_progress) = NULL; in php_session_rfc1867_callback()