PS 160 session/mod_files.c PS(invalid_session_id) = 1; PS 262 session/mod_mm.c int save_path_len = strlen(PS(save_path)); PS 280 session/mod_mm.c memcpy(ps_mm_path, PS(save_path), save_path_len); PS 281 session/mod_mm.c if (save_path_len && PS(save_path)[save_path_len - 1] != DEFAULT_SLASH) { PS 69 session/mod_user.c #define PSF(a) PS(mod_user_names).name.ps_##a PS 95 session/mod_user.c PS(mod_user_implemented) = 1; PS 105 session/mod_user.c if (!PS(mod_user_implemented)) { PS 116 session/mod_user.c PS(mod_user_implemented) = 0; PS 25 session/mod_user_class.c if (PS(default_mod) == NULL) { \ PS 32 session/mod_user_class.c if (!PS(mod_user_is_open)) { \ PS 50 session/mod_user_class.c PS(mod_user_is_open) = 1; PS 51 session/mod_user_class.c RETVAL_BOOL(SUCCESS == PS(default_mod)->s_open(&PS(mod_data), save_path, session_name TSRMLS_CC)); PS 65 session/mod_user_class.c PS(mod_user_is_open) = 0; PS 66 session/mod_user_class.c RETVAL_BOOL(SUCCESS == PS(default_mod)->s_close(&PS(mod_data) TSRMLS_CC)); PS 83 session/mod_user_class.c if (PS(default_mod)->s_read(&PS(mod_data), key, &val, &val_len TSRMLS_CC) == FAILURE) { PS 107 session/mod_user_class.c RETVAL_BOOL(SUCCESS == PS(default_mod)->s_write(&PS(mod_data), key, val, val_len TSRMLS_CC)); PS 124 session/mod_user_class.c RETVAL_BOOL(SUCCESS == PS(default_mod)->s_destroy(&PS(mod_data), key TSRMLS_CC)); PS 141 session/mod_user_class.c RETVAL_BOOL(SUCCESS == PS(default_mod)->s_gc(&PS(mod_data), maxlifetime, &nrdels TSRMLS_CC)); PS 239 session/php_session.h if (PS(http_session_vars)) { \ PS 240 session/php_session.h zend_hash_del(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1); \ PS 252 session/php_session.h HashTable *_ht = Z_ARRVAL_P(PS(http_session_vars)); \ PS 78 session/session.c if (PS(http_session_vars) && PS(http_session_vars)->type == IS_ARRAY) PS 81 session/session.c if (PS(session_status) == php_session_active) { \ PS 89 session/session.c PS(id) = NULL; PS 90 session/session.c PS(session_status) = php_session_none; PS 91 session/session.c PS(mod_data) = NULL; PS 92 session/session.c PS(mod_user_is_open) = 0; PS 94 session/session.c PS(http_session_vars) = NULL; PS 101 session/session.c if (PS(http_session_vars)) { PS 102 session/session.c zval_ptr_dtor(&PS(http_session_vars)); PS 103 session/session.c PS(http_session_vars) = NULL; PS 106 session/session.c if (PS(mod_data) || PS(mod_user_implemented)) { PS 108 session/session.c PS(mod)->s_close(&PS(mod_data) TSRMLS_CC); PS 111 session/session.c if (PS(id)) { PS 112 session/session.c efree(PS(id)); PS 121 session/session.c if (PS(session_status) != php_session_active) { PS 126 session/session.c if (PS(mod)->s_destroy(&PS(mod_data), PS(id) TSRMLS_CC) == FAILURE) { PS 143 session/session.c zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1, (void *) &sym_track); PS 152 session/session.c ZEND_SET_SYMBOL_WITH_LENGTH(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1, empty_var, 1, 0); PS 160 session/session.c zend_set_hash_symbol(state_val, name, namelen, PZVAL_IS_REF(state_val), 1, Z_ARRVAL_P(PS(http_session_vars))); PS 170 session/session.c ret = zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1, (void **) state_var); PS 183 session/session.c if (PS(http_session_vars)) { PS 184 session/session.c zval_ptr_dtor(&PS(http_session_vars)); PS 189 session/session.c PS(http_session_vars) = session_vars; PS 191 session/session.c ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), PS(http_session_vars), 2, 1); PS 200 session/session.c if (!PS(serializer)) { PS 203 session/session.c } else if (PS(serializer)->encode(&ret, newlen TSRMLS_CC) == FAILURE) { PS 215 session/session.c if (!PS(serializer)) { PS 219 session/session.c if (PS(serializer)->decode(val, vallen TSRMLS_CC) == FAILURE) { PS 307 session/session.c switch (PS(hash_func)) { PS 320 session/session.c if (!PS(hash_ops)) { PS 326 session/session.c hash_context = emalloc(PS(hash_ops)->context_size); PS 327 session/session.c PS(hash_ops)->hash_init(hash_context); PS 328 session/session.c PS(hash_ops)->hash_update(hash_context, (unsigned char *) buf, strlen(buf)); PS 329 session/session.c digest_len = PS(hash_ops)->digest_size; PS 339 session/session.c if (PS(entropy_length) > 0) { PS 342 session/session.c size_t toread = PS(entropy_length); PS 346 session/session.c switch (PS(hash_func)) { PS 355 session/session.c PS(hash_ops)->hash_update(hash_context, rbuf, toread); PS 363 session/session.c fd = VCWD_OPEN(PS(entropy_file), O_RDONLY); PS 367 session/session.c int to_read = PS(entropy_length); PS 373 session/session.c switch (PS(hash_func)) { PS 382 session/session.c PS(hash_ops)->hash_update(hash_context, rbuf, n); PS 394 session/session.c switch (PS(hash_func)) { PS 403 session/session.c PS(hash_ops)->hash_final(digest, hash_context); PS 409 session/session.c if (PS(hash_bits_per_character) < 4 PS 410 session/session.c || PS(hash_bits_per_character) > 6) { PS 411 session/session.c PS(hash_bits_per_character) = 4; PS 416 session/session.c outid = emalloc((size_t)((digest_len + 2) * ((8.0f / PS(hash_bits_per_character)) + 0.5))); PS 417 session/session.c j = (int) (bin_to_readable((char *)digest, digest_len, outid, (char)PS(hash_bits_per_character)) - outid); PS 434 session/session.c if (PS(id) && strpbrk(PS(id), "\r\n\t <>'\"\\")) { PS 435 session/session.c efree(PS(id)); PS 436 session/session.c PS(id) = NULL; PS 439 session/session.c if (!PS(mod)) { PS 445 session/session.c if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name) TSRMLS_CC) == FAILURE) { PS 446 session/session.c php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); PS 451 session/session.c if (!PS(id)) { PS 453 session/session.c PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC); PS 454 session/session.c if (PS(use_cookies)) { PS 455 session/session.c PS(send_cookie) = 1; PS 465 session/session.c PS(invalid_session_id) = 0; PS 466 session/session.c if (PS(mod)->s_read(&PS(mod_data), PS(id), &val, &vallen TSRMLS_CC) == SUCCESS) { PS 469 session/session.c } else if (PS(invalid_session_id)) { /* address instances where the session read fails due to an invalid id */ PS 470 session/session.c PS(invalid_session_id) = 0; PS 471 session/session.c efree(PS(id)); PS 472 session/session.c PS(id) = NULL; PS 483 session/session.c if (PS(mod_data) || PS(mod_user_implemented)) { PS 489 session/session.c ret = PS(mod)->s_write(&PS(mod_data), PS(id), val, vallen TSRMLS_CC); PS 492 session/session.c ret = PS(mod)->s_write(&PS(mod_data), PS(id), "", 0 TSRMLS_CC); PS 500 session/session.c PS(mod)->s_name, PS 501 session/session.c PS(save_path)); PS 505 session/session.c if (PS(mod_data) || PS(mod_user_implemented)) { PS 506 session/session.c PS(mod)->s_close(&PS(mod_data) TSRMLS_CC); PS 538 session/session.c PS(default_mod) = PS(mod); PS 539 session/session.c PS(mod) = tmp; PS 567 session/session.c PS(serializer) = tmp; PS 578 session/session.c PS(use_trans_sid) = (zend_bool) 1; PS 580 session/session.c PS(use_trans_sid) = (zend_bool) atoi(new_value); PS 624 session/session.c PS(hash_ops) = NULL; PS 630 session/session.c PS(hash_func) = val ? 1 : 0; PS 637 session/session.c PS(hash_func) = PS_HASH_FUNC_MD5; PS 644 session/session.c PS(hash_func) = PS_HASH_FUNC_SHA1; PS 654 session/session.c PS(hash_func) = PS_HASH_FUNC_OTHER; PS 655 session/session.c PS(hash_ops) = ops; PS 679 session/session.c PS(rfc1867_freq) = -tmp; PS 681 session/session.c PS(rfc1867_freq) = tmp; PS 823 session/session.c if ((Z_TYPE_PP(tmp) == IS_ARRAY && Z_ARRVAL_PP(tmp) == &EG(symbol_table)) || *tmp == PS(http_session_vars)) { PS 916 session/session.c if ((Z_TYPE_PP(tmp) == IS_ARRAY && Z_ARRVAL_PP(tmp) == &EG(symbol_table)) || *tmp == PS(http_session_vars)) { PS 1072 session/session.c now = tv.tv_sec + PS(cache_expire) * 60; PS 1077 session/session.c snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=%ld", PS(cache_expire) * 60); /* SAFE */ PS 1088 session/session.c snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=%ld, pre-check=%ld", PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */ PS 1126 session/session.c if (PS(cache_limiter)[0] == '\0') return 0; PS 1141 session/session.c if (!strcasecmp(lim->name, PS(cache_limiter))) { PS 1181 session/session.c e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name)), NULL); PS 1182 session/session.c e_id = php_url_encode(PS(id), strlen(PS(id)), NULL); PS 1192 session/session.c if (PS(cookie_lifetime) > 0) { PS 1197 session/session.c t = tv.tv_sec + PS(cookie_lifetime); PS 1207 session/session.c if (PS(cookie_path)[0]) { PS 1209 session/session.c smart_str_appends(&ncookie, PS(cookie_path)); PS 1212 session/session.c if (PS(cookie_domain)[0]) { PS 1214 session/session.c smart_str_appends(&ncookie, PS(cookie_domain)); PS 1217 session/session.c if (PS(cookie_secure)) { PS 1221 session/session.c if (PS(cookie_httponly)) { PS 1266 session/session.c PS(id) = estrndup(Z_STRVAL_PP(ppid), Z_STRLEN_PP(ppid)) PS 1270 session/session.c int module_number = PS(module_number); PS 1272 session/session.c if (PS(use_cookies) && PS(send_cookie)) { PS 1274 session/session.c PS(send_cookie) = 0; PS 1280 session/session.c if (PS(define_sid)) { PS 1283 session/session.c smart_str_appends(&var, PS(session_name)); PS 1285 session/session.c smart_str_appends(&var, PS(id)); PS 1292 session/session.c if (PS(apply_trans_sid)) { PS 1294 session/session.c php_url_scanner_add_var(PS(session_name), strlen(PS(session_name)), PS(id), strlen(PS(id)), 1 TSRMLS_CC); PS 1307 session/session.c if (PS(use_only_cookies)) { PS 1308 session/session.c PS(apply_trans_sid) = 0; PS 1310 session/session.c PS(apply_trans_sid) = PS(use_trans_sid); PS 1313 session/session.c switch (PS(session_status)) { PS 1321 session/session.c if (!PS(mod) && value) { PS 1322 session/session.c PS(mod) = _php_find_ps_module(value TSRMLS_CC); PS 1323 session/session.c if (!PS(mod)) { PS 1329 session/session.c if (!PS(serializer) && value) { PS 1330 session/session.c PS(serializer) = _php_find_ps_serializer(value TSRMLS_CC); PS 1331 session/session.c if (!PS(serializer)) { PS 1336 session/session.c PS(session_status) = php_session_none; PS 1341 session/session.c PS(define_sid) = 1; PS 1342 session/session.c PS(send_cookie) = 1; PS 1345 session/session.c lensess = strlen(PS(session_name)); PS 1350 session/session.c if (!PS(id)) { PS 1351 session/session.c if (PS(use_cookies) && zend_hash_find(&EG(symbol_table), "_COOKIE", sizeof("_COOKIE"), (void **) &data) == SUCCESS && PS 1353 session/session.c zend_hash_find(Z_ARRVAL_PP(data), PS(session_name), lensess + 1, (void **) &ppid) == SUCCESS PS 1356 session/session.c PS(apply_trans_sid) = 0; PS 1357 session/session.c PS(send_cookie) = 0; PS 1358 session/session.c PS(define_sid) = 0; PS 1361 session/session.c if (!PS(use_only_cookies) && !PS(id) && PS 1364 session/session.c zend_hash_find(Z_ARRVAL_PP(data), PS(session_name), lensess + 1, (void **) &ppid) == SUCCESS PS 1367 session/session.c PS(send_cookie) = 0; PS 1370 session/session.c if (!PS(use_only_cookies) && !PS(id) && PS 1373 session/session.c zend_hash_find(Z_ARRVAL_PP(data), PS(session_name), lensess + 1, (void **) &ppid) == SUCCESS PS 1376 session/session.c PS(send_cookie) = 0; PS 1384 session/session.c if (!PS(use_only_cookies) && !PS(id) && PG(http_globals)[TRACK_VARS_SERVER] && PS 1387 session/session.c (p = strstr(Z_STRVAL_PP(data), PS(session_name))) && PS 1394 session/session.c PS(id) = estrndup(p, q - p); PS 1395 session/session.c PS(send_cookie) = 0; PS 1402 session/session.c if (PS(id) && PS 1403 session/session.c PS(extern_referer_chk)[0] != '\0' && PS 1408 session/session.c strstr(Z_STRVAL_PP(data), PS(extern_referer_chk)) == NULL PS 1410 session/session.c efree(PS(id)); PS 1411 session/session.c PS(id) = NULL; PS 1412 session/session.c PS(send_cookie) = 1; PS 1413 session/session.c if (PS(use_trans_sid) && !PS(use_only_cookies)) { PS 1414 session/session.c PS(apply_trans_sid) = 1; PS 1420 session/session.c if (!PS(use_cookies) && PS(send_cookie)) { PS 1421 session/session.c if (PS(use_trans_sid) && !PS(use_only_cookies)) { PS 1422 session/session.c PS(apply_trans_sid) = 1; PS 1424 session/session.c PS(send_cookie) = 0; PS 1429 session/session.c PS(session_status) = php_session_active; PS 1433 session/session.c if ((PS(mod_data) || PS(mod_user_implemented)) && PS(gc_probability) > 0) { PS 1436 session/session.c nrand = (int) ((float) PS(gc_divisor) * php_combined_lcg(TSRMLS_C)); PS 1437 session/session.c if (nrand < PS(gc_probability)) { PS 1438 session/session.c PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &nrdels TSRMLS_CC); PS 1451 session/session.c if (PS(session_status) == php_session_active) { PS 1452 session/session.c PS(session_status) = php_session_none; PS 1460 session/session.c if (PS(apply_trans_sid) && (PS(session_status) == php_session_active)) { PS 1461 session/session.c *new = php_url_scanner_adapt_single_url(url, urllen, PS(session_name), PS(id), newlen TSRMLS_CC); PS 1479 session/session.c if (!PS(use_cookies) || PS 1514 session/session.c add_assoc_long(return_value, "lifetime", PS(cookie_lifetime)); PS 1515 session/session.c add_assoc_string(return_value, "path", PS(cookie_path), 1); PS 1516 session/session.c add_assoc_string(return_value, "domain", PS(cookie_domain), 1); PS 1517 session/session.c add_assoc_bool(return_value, "secure", PS(cookie_secure)); PS 1518 session/session.c add_assoc_bool(return_value, "httponly", PS(cookie_httponly)); PS 1533 session/session.c RETVAL_STRING(PS(session_name), 1); PS 1553 session/session.c if (PS(mod) && PS(mod)->s_name) { PS 1554 session/session.c RETVAL_STRING(safe_estrdup(PS(mod)->s_name), 0); PS 1566 session/session.c if (PS(mod_data) || PS(mod_user_implemented)) { PS 1567 session/session.c PS(mod)->s_close(&PS(mod_data) TSRMLS_CC); PS 1569 session/session.c PS(mod_data) = NULL; PS 1584 session/session.c if (PS(session_status) != php_session_none) { PS 1613 session/session.c if (PS(mod_user_names).names[i] != NULL) { PS 1614 session/session.c zval_ptr_dtor(&PS(mod_user_names).names[i]); PS 1622 session/session.c PS(mod_user_names).names[i] = callback; PS 1653 session/session.c if (PS(mod) && PS(session_status) == php_session_none && PS(mod) != &ps_mod_user) { PS 1677 session/session.c if (PS(mod) && PS(mod) != &ps_mod_user) { PS 1682 session/session.c if (PS(mod_user_names).names[i] != NULL) { PS 1683 session/session.c zval_ptr_dtor(&PS(mod_user_names).names[i]); PS 1686 session/session.c PS(mod_user_names).names[i] = *args[i]; PS 1705 session/session.c RETVAL_STRING(PS(save_path), 1); PS 1729 session/session.c if (PS(id)) { PS 1730 session/session.c RETVAL_STRING(PS(id), 1); PS 1736 session/session.c if (PS(id)) { PS 1737 session/session.c efree(PS(id)); PS 1739 session/session.c PS(id) = estrndup(name, name_len); PS 1754 session/session.c if (SG(headers_sent) && PS(use_cookies)) { PS 1759 session/session.c if (PS(session_status) == php_session_active) { PS 1760 session/session.c if (PS(id)) { PS 1761 session/session.c if (del_ses && PS(mod)->s_destroy(&PS(mod_data), PS(id) TSRMLS_CC) == FAILURE) { PS 1765 session/session.c efree(PS(id)); PS 1766 session/session.c PS(id) = NULL; PS 1769 session/session.c PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC); PS 1771 session/session.c PS(send_cookie) = 1; PS 1791 session/session.c RETVAL_STRING(PS(cache_limiter), 1); PS 1810 session/session.c RETVAL_LONG(PS(cache_expire)); PS 1846 session/session.c if (PS(session_status) == php_session_none) { PS 1867 session/session.c if (PS(session_status) != php_session_active) { PS 1890 session/session.c if (PS(session_status) == php_session_none) { PS 1897 session/session.c SEPARATE_ZVAL_IF_NOT_REF(&PS(http_session_vars)); PS 1898 session/session.c ht_sess_var = Z_ARRVAL_P(PS(http_session_vars)); PS 1922 session/session.c RETURN_LONG(PS(session_status)); PS 2102 session/session.c if (PS(mod) == NULL) { PS 2107 session/session.c PS(mod) = _php_find_ps_module(value TSRMLS_CC); PS 2111 session/session.c if (PS(serializer) == NULL) { PS 2116 session/session.c PS(serializer) = _php_find_ps_serializer(value TSRMLS_CC); PS 2120 session/session.c if (PS(mod) == NULL || PS(serializer) == NULL) { PS 2122 session/session.c PS(session_status) = php_session_disabled; PS 2135 session/session.c return php_rinit_session(PS(auto_start) TSRMLS_CC); PS 2150 session/session.c if (PS(mod_user_names).names[i] != NULL) { PS 2151 session/session.c zval_ptr_dtor(&PS(mod_user_names).names[i]); PS 2152 session/session.c PS(mod_user_names).names[i] = NULL; PS 2187 session/session.c PS(module_number) = module_number; /* if we really need this var we need to init it in zts mode as well! */ PS 2189 session/session.c PS(session_status) = php_session_none; PS 2299 session/session.c if (zend_hash_find(Z_ARRVAL_P(PG(http_globals)[where]), PS(session_name), progress->sname_len+1, (void **)&ppid) == SUCCESS PS 2312 session/session.c if (PS(use_cookies)) { PS 2319 session/session.c if (PS(use_only_cookies)) { PS 2330 session/session.c if (zend_symtable_find(Z_ARRVAL_P(PS(http_session_vars)), progress->key.c, progress->key.len+1, (void**)&progress_ary) != SUCCESS) { PS 2349 session/session.c if (PS(rfc1867_min_freq) > 0.0) { PS 2357 session/session.c progress->next_update_time = dtv + PS(rfc1867_min_freq); PS 2364 session/session.c PS(session_status) = php_session_active; PS 2367 session/session.c ZEND_SET_SYMBOL_WITH_LENGTH(Z_ARRVAL_P(PS(http_session_vars)), progress->key.c, progress->key.len+1, progress->data, 2, 0); PS 2375 session/session.c PS(session_status) = php_session_active; PS 2377 session/session.c zend_hash_del(Z_ARRVAL_P(PS(http_session_vars)), progress->key.c, progress->key.len+1); PS 2390 session/session.c if (!PS(rfc1867_enabled)) { PS 2394 session/session.c progress = PS(rfc1867_progress); PS 2401 session/session.c progress->sname_len = strlen(PS(session_name)); PS 2402 session/session.c PS(rfc1867_progress) = progress; PS 2423 session/session.c if (name_len == progress->sname_len && memcmp(data->name, PS(session_name), name_len) == 0) { PS 2427 session/session.c } else if (name_len == PS(rfc1867_name).len && memcmp(data->name, PS(rfc1867_name).c, name_len) == 0) { PS 2429 session/session.c smart_str_appendl(&progress->key, PS(rfc1867_prefix).c, PS(rfc1867_prefix).len); PS 2433 session/session.c progress->apply_trans_sid = PS(use_trans_sid); PS 2451 session/session.c if (PS(rfc1867_freq) >= 0) { PS 2452 session/session.c progress->update_step = PS(rfc1867_freq); PS 2453 session/session.c } else if (PS(rfc1867_freq) < 0) { /* % of total size */ PS 2454 session/session.c progress->update_step = progress->content_length * -PS(rfc1867_freq) / 100; PS 2475 session/session.c PS(id) = estrndup(Z_STRVAL(progress->sid), Z_STRLEN(progress->sid)); PS 2476 session/session.c PS(apply_trans_sid) = progress->apply_trans_sid; PS 2477 session/session.c PS(send_cookie) = 0; PS 2538 session/session.c if (PS(rfc1867_cleanup)) { PS 2555 session/session.c PS(rfc1867_progress) = NULL; PS 1629 soap/soap.c if (PS(session_status) != php_session_active && PS 1630 soap/soap.c PS(session_status) != php_session_disabled) { PS 1635 soap/soap.c if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS && PS 1711 soap/soap.c if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {