Lines Matching refs:PS

89 	if (Z_ISREF_P(&PS(http_session_vars)) && Z_TYPE_P(Z_REFVAL(PS(http_session_vars))) == IS_ARRAY)
92 if (PS(session_status) == php_session_active) { \
103 #define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies))
116 PS(id) = NULL; in php_rinit_session_globals()
117 PS(session_status) = php_session_none; in php_rinit_session_globals()
118 PS(in_save_handler) = 0; in php_rinit_session_globals()
119 PS(set_handler) = 0; in php_rinit_session_globals()
120 PS(mod_data) = NULL; in php_rinit_session_globals()
121 PS(mod_user_is_open) = 0; in php_rinit_session_globals()
122 PS(define_sid) = 1; in php_rinit_session_globals()
123 PS(session_vars) = NULL; in php_rinit_session_globals()
124 PS(module_number) = my_module_number; in php_rinit_session_globals()
125 ZVAL_UNDEF(&PS(http_session_vars)); in php_rinit_session_globals()
133 if (!Z_ISUNDEF(PS(http_session_vars))) { in php_rshutdown_session_globals()
134 zval_ptr_dtor(&PS(http_session_vars)); in php_rshutdown_session_globals()
135 ZVAL_UNDEF(&PS(http_session_vars)); in php_rshutdown_session_globals()
137 if (PS(mod_data) || PS(mod_user_implemented)) { in php_rshutdown_session_globals()
139 PS(mod)->s_close(&PS(mod_data)); in php_rshutdown_session_globals()
142 if (PS(id)) { in php_rshutdown_session_globals()
143 zend_string_release(PS(id)); in php_rshutdown_session_globals()
144 PS(id) = NULL; in php_rshutdown_session_globals()
147 if (PS(session_vars)) { in php_rshutdown_session_globals()
148 zend_string_release(PS(session_vars)); in php_rshutdown_session_globals()
149 PS(session_vars) = NULL; in php_rshutdown_session_globals()
154 PS(session_status) = php_session_none; in php_rshutdown_session_globals()
162 if (PS(session_status) != php_session_active) { in php_session_destroy()
167 if (PS(id) && PS(mod)->s_destroy(&PS(mod_data), PS(id)) == FAILURE) { in php_session_destroy()
182 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_add_session_var()
196 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_set_session_var()
207 return zend_hash_find(Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))), name); in php_get_session_var()
220 if (!Z_ISUNDEF(PS(http_session_vars))) { in php_session_track_init()
221 zval_ptr_dtor(&PS(http_session_vars)); in php_session_track_init()
225 ZVAL_NEW_REF(&PS(http_session_vars), &session_vars); in php_session_track_init()
226 Z_ADDREF_P(&PS(http_session_vars)); in php_session_track_init()
227 zend_hash_update_ind(&EG(symbol_table), var_name, &PS(http_session_vars)); in php_session_track_init()
235 if (!PS(serializer)) { in php_session_encode()
239 return PS(serializer)->encode(); in php_session_encode()
249 if (!PS(serializer)) { in php_session_decode()
253 if (PS(serializer)->decode(ZSTR_VAL(data), ZSTR_LEN(data)) == FAILURE) { in php_session_decode()
319 if (php_random_bytes_throw(rbuf, PS(sid_length) + PS_EXTRA_RAND_BYTES) == FAILURE) { in php_session_create_id()
323 outid = zend_string_alloc(PS(sid_length), 0); in php_session_create_id()
324 …ZSTR_LEN(outid) = bin_to_readable(rbuf, PS(sid_length), ZSTR_VAL(outid), (char)PS(sid_bits_per_cha… in php_session_create_id()
371 if ((PS(mod_data) || PS(mod_user_implemented))) { in php_session_gc()
373 PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &num); in php_session_gc()
376 nrand = (zend_long) ((float) PS(gc_divisor) * php_combined_lcg()); in php_session_gc()
377 if (PS(gc_probability) > 0 && nrand < PS(gc_probability)) { in php_session_gc()
378 PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &num); in php_session_gc()
388 PS(session_status) = php_session_active; in php_session_initialize()
390 if (!PS(mod)) { in php_session_initialize()
391 PS(session_status) = php_session_disabled; in php_session_initialize()
397 if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE in php_session_initialize()
401 …, E_WARNING, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in php_session_initialize()
406 if (!PS(id) || !ZSTR_VAL(PS(id))[0]) { in php_session_initialize()
407 if (PS(id)) { in php_session_initialize()
408 zend_string_release(PS(id)); in php_session_initialize()
410 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in php_session_initialize()
411 if (!PS(id)) { in php_session_initialize()
413 …zend_throw_error(NULL, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path… in php_session_initialize()
416 if (PS(use_cookies)) { in php_session_initialize()
417 PS(send_cookie) = 1; in php_session_initialize()
419 } else if (PS(use_strict_mode) && PS(mod)->s_validate_sid && in php_session_initialize()
420 PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == FAILURE) { in php_session_initialize()
421 if (PS(id)) { in php_session_initialize()
422 zend_string_release(PS(id)); in php_session_initialize()
424 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in php_session_initialize()
425 if (!PS(id)) { in php_session_initialize()
426 PS(id) = php_session_create_id(NULL); in php_session_initialize()
428 if (PS(use_cookies)) { in php_session_initialize()
429 PS(send_cookie) = 1; in php_session_initialize()
440 if (PS(mod)->s_read(&PS(mod_data), PS(id), &val, PS(gc_maxlifetime)) == FAILURE) { in php_session_initialize()
443 …ref(NULL, E_WARNING, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in php_session_initialize()
450 if (PS(session_vars)) { in php_session_initialize()
451 zend_string_release(PS(session_vars)); in php_session_initialize()
452 PS(session_vars) = NULL; in php_session_initialize()
455 if (PS(lazy_write)) { in php_session_initialize()
456 PS(session_vars) = zend_string_copy(val); in php_session_initialize()
471 if (PS(mod_data) || PS(mod_user_implemented)) { in php_session_save_current_state()
476 if (PS(lazy_write) && PS(session_vars) in php_session_save_current_state()
477 && PS(mod)->s_update_timestamp in php_session_save_current_state()
478 && PS(mod)->s_update_timestamp != php_session_update_timestamp in php_session_save_current_state()
479 && ZSTR_LEN(val) == ZSTR_LEN(PS(session_vars)) in php_session_save_current_state()
480 && !memcmp(ZSTR_VAL(val), ZSTR_VAL(PS(session_vars)), ZSTR_LEN(val)) in php_session_save_current_state()
482 ret = PS(mod)->s_update_timestamp(&PS(mod_data), PS(id), val, PS(gc_maxlifetime)); in php_session_save_current_state()
484 ret = PS(mod)->s_write(&PS(mod_data), PS(id), val, PS(gc_maxlifetime)); in php_session_save_current_state()
488 ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime)); in php_session_save_current_state()
493 if (!PS(mod_user_implemented)) { in php_session_save_current_state()
497 PS(mod)->s_name, in php_session_save_current_state()
498 PS(save_path)); in php_session_save_current_state()
501 "defined save handler. (session.save_path: %s)", PS(save_path)); in php_session_save_current_state()
507 if (PS(mod_data) || PS(mod_user_implemented)) { in php_session_save_current_state()
508 PS(mod)->s_close(&PS(mod_data)); in php_session_save_current_state()
560 if (!PS(set_handler) && tmp == ps_user_ptr) { in PHP_INI_MH()
565 PS(default_mod) = PS(mod); in PHP_INI_MH()
566 PS(mod) = tmp; in PHP_INI_MH()
596 PS(serializer) = tmp; in PHP_INI_MH()
608 PS(use_trans_sid) = (zend_bool) 1; in PHP_INI_MH()
610 PS(use_trans_sid) = (zend_bool) atoi(ZSTR_VAL(new_value)); in PHP_INI_MH()
730 PS(sid_length) = val; in PHP_INI_MH()
750 PS(sid_bits_per_character) = val; in PHP_INI_MH()
783 PS(rfc1867_freq) = -tmp; in PHP_INI_MH()
785 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()
1410 PS(id) = zend_string_init(Z_STRVAL_P(ppid), Z_STRLEN_P(ppid), 0); in ppid2sid()
1411 PS(send_cookie) = 0; in ppid2sid()
1413 PS(id) = NULL; in ppid2sid()
1414 PS(send_cookie) = 1; in ppid2sid()
1421 int module_number = PS(module_number); in php_session_reset_id()
1425 if (!PS(id)) { in php_session_reset_id()
1430 if (PS(use_cookies) && PS(send_cookie)) { in php_session_reset_id()
1432 PS(send_cookie) = 0; in php_session_reset_id()
1440 if (PS(define_sid)) { in php_session_reset_id()
1443 smart_str_appends(&var, PS(session_name)); in php_session_reset_id()
1445 smart_str_appends(&var, ZSTR_VAL(PS(id))); in php_session_reset_id()
1467 if (PS(use_cookies) && in php_session_reset_id()
1471 (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), strlen(PS(session_name))))) { in php_session_reset_id()
1479 sname = zend_string_init(PS(session_name), strlen(PS(session_name)), 0); in php_session_reset_id()
1482 …php_url_scanner_add_session_var(PS(session_name), strlen(PS(session_name)), ZSTR_VAL(PS(id)), ZSTR… in php_session_reset_id()
1496 switch (PS(session_status)) { in php_session_start()
1504 if (!PS(mod) && value) { in php_session_start()
1505 PS(mod) = _php_find_ps_module(value); in php_session_start()
1506 if (!PS(mod)) { in php_session_start()
1512 if (!PS(serializer) && value) { in php_session_start()
1513 PS(serializer) = _php_find_ps_serializer(value); in php_session_start()
1514 if (!PS(serializer)) { in php_session_start()
1519 PS(session_status) = php_session_none; in php_session_start()
1525 PS(define_sid) = !PS(use_only_cookies); /* SID constant is defined when non-cookie ID is used */ in php_session_start()
1526 PS(send_cookie) = PS(use_cookies) || PS(use_only_cookies); in php_session_start()
1529 lensess = strlen(PS(session_name)); in php_session_start()
1539 if (!PS(id)) { in php_session_start()
1540 …if (PS(use_cookies) && (data = zend_hash_str_find(&EG(symbol_table), "_COOKIE", sizeof("_COOKIE") … in php_session_start()
1542 …if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), l… in php_session_start()
1544 PS(send_cookie) = 0; in php_session_start()
1545 PS(define_sid) = 0; in php_session_start()
1549 if (!PS(use_only_cookies)) { in php_session_start()
1550 if (!PS(id) && (data = zend_hash_str_find(&EG(symbol_table), "_GET", sizeof("_GET") - 1))) { in php_session_start()
1552 …if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), l… in php_session_start()
1556 if (!PS(id) && (data = zend_hash_str_find(&EG(symbol_table), "_POST", sizeof("_POST") - 1))) { in php_session_start()
1558 …if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), l… in php_session_start()
1565 if (!PS(id) && zend_is_auto_global_str("_SERVER", sizeof("_SERVER") - 1) == SUCCESS && in php_session_start()
1568 (p = strstr(Z_STRVAL_P(data), PS(session_name))) && in php_session_start()
1574 PS(id) = zend_string_init(p, q - p, 0); in php_session_start()
1579 if (PS(id) && PS(extern_referer_chk)[0] != '\0' && in php_session_start()
1584 strstr(Z_STRVAL_P(data), PS(extern_referer_chk)) == NULL in php_session_start()
1586 zend_string_release(PS(id)); in php_session_start()
1587 PS(id) = NULL; in php_session_start()
1594 if (PS(id) && strpbrk(ZSTR_VAL(PS(id)), "\r\n\t <>'\"\\")) { in php_session_start()
1595 zend_string_release(PS(id)); in php_session_start()
1596 PS(id) = NULL; in php_session_start()
1601 PS(session_status) = php_session_none; in php_session_start()
1602 if (PS(id)) { in php_session_start()
1603 zend_string_release(PS(id)); in php_session_start()
1604 PS(id) = NULL; in php_session_start()
1614 if (PS(session_status) == php_session_active) { in php_session_flush()
1616 PS(session_status) = php_session_none; in php_session_flush()
1625 if (PS(session_status) == php_session_active) { in php_session_abort()
1626 if (PS(mod_data) || PS(mod_user_implemented)) { in php_session_abort()
1627 PS(mod)->s_close(&PS(mod_data)); in php_session_abort()
1629 PS(session_status) = php_session_none; in php_session_abort()
1638 if (PS(session_status) == php_session_active in php_session_reset()
1652 if (APPLY_TRANS_SID && (PS(session_status) == php_session_active)) { in session_adapt_url()
1653 …*new = php_url_scanner_adapt_single_url(url, urllen, PS(session_name), ZSTR_VAL(PS(id)), newlen, 1… in session_adapt_url()
1672 if (!PS(use_cookies) || in PHP_FUNCTION()
1678 if (PS(session_status) == php_session_active) { in PHP_FUNCTION()
1745 add_assoc_long(return_value, "lifetime", PS(cookie_lifetime)); in PHP_FUNCTION()
1746 add_assoc_string(return_value, "path", PS(cookie_path)); in PHP_FUNCTION()
1747 add_assoc_string(return_value, "domain", PS(cookie_domain)); in PHP_FUNCTION()
1748 add_assoc_bool(return_value, "secure", PS(cookie_secure)); in PHP_FUNCTION()
1749 add_assoc_bool(return_value, "httponly", PS(cookie_httponly)); in PHP_FUNCTION()
1764 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
1774 RETVAL_STRING(PS(session_name)); in PHP_FUNCTION()
1795 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
1806 if (PS(mod) && PS(mod)->s_name) { in PHP_FUNCTION()
1807 RETVAL_STRING(PS(mod)->s_name); in PHP_FUNCTION()
1819 if (PS(mod_data) || PS(mod_user_implemented)) { in PHP_FUNCTION()
1820 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
1822 PS(mod_data) = NULL; in PHP_FUNCTION()
1839 if (PS(session_status) == php_session_active) { in PHP_FUNCTION()
1864 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1865 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1868 array_init_size(&PS(mod_user_names).names[i], 2); in PHP_FUNCTION()
1870 add_next_index_zval(&PS(mod_user_names).names[i], obj); in PHP_FUNCTION()
1871 add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); in PHP_FUNCTION()
1883 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1884 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1886 array_init_size(&PS(mod_user_names).names[i], 2); in PHP_FUNCTION()
1888 add_next_index_zval(&PS(mod_user_names).names[i], obj); in PHP_FUNCTION()
1889 add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); in PHP_FUNCTION()
1891 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1892 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1893 ZVAL_UNDEF(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1903 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1904 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1906 array_init_size(&PS(mod_user_names).names[i], 2); in PHP_FUNCTION()
1908 add_next_index_zval(&PS(mod_user_names).names[i], obj); in PHP_FUNCTION()
1909 add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); in PHP_FUNCTION()
1911 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1912 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1913 ZVAL_UNDEF(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1939 if (PS(mod) && PS(session_status) != php_session_active && PS(mod) != &ps_mod_user) { in PHP_FUNCTION()
1942 PS(set_handler) = 1; in PHP_FUNCTION()
1944 PS(set_handler) = 0; in PHP_FUNCTION()
1974 if (PS(mod) && PS(mod) != &ps_mod_user) { in PHP_FUNCTION()
1977 PS(set_handler) = 1; in PHP_FUNCTION()
1979 PS(set_handler) = 0; in PHP_FUNCTION()
1985 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_FUNCTION()
1986 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_FUNCTION()
1988 ZVAL_COPY(&PS(mod_user_names).names[i], &args[i]); in PHP_FUNCTION()
2006 if (name && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2016 RETVAL_STRING(PS(save_path)); in PHP_FUNCTION()
2042 if (name && PS(use_cookies) && SG(headers_sent)) { in PHP_FUNCTION()
2047 if (PS(id)) { in PHP_FUNCTION()
2050 size_t len = strlen(ZSTR_VAL(PS(id))); in PHP_FUNCTION()
2051 if (UNEXPECTED(len != ZSTR_LEN(PS(id)))) { in PHP_FUNCTION()
2052 RETVAL_NEW_STR(zend_string_init(ZSTR_VAL(PS(id)), len, 0)); in PHP_FUNCTION()
2054 RETVAL_STR_COPY(PS(id)); in PHP_FUNCTION()
2061 if (PS(id)) { in PHP_FUNCTION()
2062 zend_string_release(PS(id)); in PHP_FUNCTION()
2064 PS(id) = zend_string_copy(name); in PHP_FUNCTION()
2080 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2092 if (PS(mod)->s_destroy(&PS(mod_data), PS(id)) == FAILURE) { in PHP_FUNCTION()
2093 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2094 PS(session_status) = php_session_none; in PHP_FUNCTION()
2095 …_WARNING, "Session object destruction failed. ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in PHP_FUNCTION()
2102 ret = PS(mod)->s_write(&PS(mod_data), PS(id), data, PS(gc_maxlifetime)); in PHP_FUNCTION()
2105 ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime)); in PHP_FUNCTION()
2108 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2109 PS(session_status) = php_session_none; in PHP_FUNCTION()
2110 …php_error_docref(NULL, E_WARNING, "Session write failed. ID: %s (path: %s)", PS(mod)->s_name, PS(s… in PHP_FUNCTION()
2114 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2117 if (PS(session_vars)) { in PHP_FUNCTION()
2118 zend_string_release(PS(session_vars)); in PHP_FUNCTION()
2119 PS(session_vars) = NULL; in PHP_FUNCTION()
2121 zend_string_release(PS(id)); in PHP_FUNCTION()
2122 PS(id) = NULL; in PHP_FUNCTION()
2124 if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE) { in PHP_FUNCTION()
2125 PS(session_status) = php_session_none; in PHP_FUNCTION()
2126 zend_throw_error(NULL, "Failed to open session: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in PHP_FUNCTION()
2130 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in PHP_FUNCTION()
2131 if (!PS(id)) { in PHP_FUNCTION()
2132 PS(session_status) = php_session_none; in PHP_FUNCTION()
2133 …zend_throw_error(NULL, "Failed to create new session ID: %s (path: %s)", PS(mod)->s_name, PS(save_… in PHP_FUNCTION()
2136 if (PS(use_strict_mode) && PS(mod)->s_validate_sid && in PHP_FUNCTION()
2137 PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == FAILURE) { in PHP_FUNCTION()
2138 zend_string_release(PS(id)); in PHP_FUNCTION()
2139 PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); in PHP_FUNCTION()
2140 if (!PS(id)) { in PHP_FUNCTION()
2141 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2142 PS(session_status) = php_session_none; in PHP_FUNCTION()
2143 …r(NULL, "Failed to create session ID by collision: %s (path: %s)", PS(mod)->s_name, PS(save_path)); in PHP_FUNCTION()
2148 if (PS(mod)->s_read(&PS(mod_data), PS(id), &data, PS(gc_maxlifetime)) == FAILURE) { in PHP_FUNCTION()
2149 PS(mod)->s_close(&PS(mod_data)); in PHP_FUNCTION()
2150 PS(session_status) = php_session_none; in PHP_FUNCTION()
2151 …zend_throw_error(NULL, "Failed to create(read) session ID: %s (path: %s)", PS(mod)->s_name, PS(sav… in PHP_FUNCTION()
2158 if (PS(use_cookies)) { in PHP_FUNCTION()
2159 PS(send_cookie) = 1; in PHP_FUNCTION()
2191 if (!PS(in_save_handler) && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2194 new_id = PS(mod)->s_create_sid(&PS(mod_data)); in PHP_FUNCTION()
2195 if (!PS(mod)->s_validate_sid) { in PHP_FUNCTION()
2199 if (PS(mod)->s_validate_sid(&PS(mod_data), new_id) == FAILURE) { in PHP_FUNCTION()
2235 if (limiter && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2245 RETVAL_STRING(PS(cache_limiter)); in PHP_FUNCTION()
2266 if (expires && PS(session_status) == php_session_active) { in PHP_FUNCTION()
2268 RETURN_LONG(PS(cache_expire)); in PHP_FUNCTION()
2276 RETVAL_LONG(PS(cache_expire)); in PHP_FUNCTION()
2316 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2354 if (PS(session_status) == php_session_active) { in PHP_FUNCTION()
2364 if (PS(use_cookies) && SG(headers_sent)) { in PHP_FUNCTION()
2399 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2401 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in PHP_FUNCTION()
2437 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2442 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in PHP_FUNCTION()
2462 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2485 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2501 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2517 if (PS(session_status) != php_session_active) { in PHP_FUNCTION()
2533 RETURN_LONG(PS(session_status)); in PHP_FUNCTION()
2755 if (PS(mod) == NULL) { in php_rinit_session()
2760 PS(mod) = _php_find_ps_module(value); in php_rinit_session()
2764 if (PS(serializer) == NULL) { in php_rinit_session()
2769 PS(serializer) = _php_find_ps_serializer(value); in php_rinit_session()
2773 if (PS(mod) == NULL || PS(serializer) == NULL) { in php_rinit_session()
2775 PS(session_status) = php_session_disabled; in php_rinit_session()
2788 return php_rinit_session(PS(auto_start)); in PHP_RINIT_FUNCTION()
2796 if (PS(session_status) == php_session_active) { in PHP_RSHUTDOWN_FUNCTION()
2805 if (!Z_ISUNDEF(PS(mod_user_names).names[i])) { in PHP_RSHUTDOWN_FUNCTION()
2806 zval_ptr_dtor(&PS(mod_user_names).names[i]); in PHP_RSHUTDOWN_FUNCTION()
2807 ZVAL_UNDEF(&PS(mod_user_names).names[i]); in PHP_RSHUTDOWN_FUNCTION()
2849 PS(module_number) = module_number; in PHP_MINIT_FUNCTION()
2851 PS(session_status) = php_session_none; in PHP_MINIT_FUNCTION()
2976 …if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name), progress->snam… in early_find_sid_in()
2990 if (PS(use_cookies)) { in php_session_rfc1867_early_find_sid()
2997 if (PS(use_only_cookies)) { in php_session_rfc1867_early_find_sid()
3008 …if ((progress_ary = zend_symtable_find(Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))), progress->key.… in php_check_cancel_upload()
3027 if (PS(rfc1867_min_freq) > 0.0) { in php_session_rfc1867_update()
3035 progress->next_update_time = dtv + PS(rfc1867_min_freq); in php_session_rfc1867_update()
3042 PS(session_status) = php_session_active; in php_session_rfc1867_update()
3044 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_session_rfc1867_update()
3057 PS(session_status) = php_session_active; in php_session_rfc1867_cleanup()
3059 zval *sess_var = Z_REFVAL(PS(http_session_vars)); in php_session_rfc1867_cleanup()
3074 if (!PS(rfc1867_enabled)) { in php_session_rfc1867_callback()
3078 progress = PS(rfc1867_progress); in php_session_rfc1867_callback()
3085 progress->sname_len = strlen(PS(session_name)); in php_session_rfc1867_callback()
3086 PS(rfc1867_progress) = progress; in php_session_rfc1867_callback()
3107 if (name_len == progress->sname_len && memcmp(data->name, PS(session_name), name_len) == 0) { in php_session_rfc1867_callback()
3110 …} else if (name_len == strlen(PS(rfc1867_name)) && memcmp(data->name, PS(rfc1867_name), name_len +… in php_session_rfc1867_callback()
3112 smart_str_appends(&progress->key, PS(rfc1867_prefix)); in php_session_rfc1867_callback()
3134 if (PS(rfc1867_freq) >= 0) { in php_session_rfc1867_callback()
3135 progress->update_step = PS(rfc1867_freq); in php_session_rfc1867_callback()
3136 } else if (PS(rfc1867_freq) < 0) { /* % of total size */ in php_session_rfc1867_callback()
3137 progress->update_step = progress->content_length * -PS(rfc1867_freq) / 100; in php_session_rfc1867_callback()
3154 PS(id) = zend_string_init(Z_STRVAL(progress->sid), Z_STRLEN(progress->sid), 0); in php_session_rfc1867_callback()
3157 PS(use_trans_sid) = 1; in php_session_rfc1867_callback()
3158 PS(use_only_cookies) = 0; in php_session_rfc1867_callback()
3160 PS(send_cookie) = 0; in php_session_rfc1867_callback()
3219 if (PS(rfc1867_cleanup)) { in php_session_rfc1867_callback()
3239 PS(rfc1867_progress) = NULL; in php_session_rfc1867_callback()