diff options
Diffstat (limited to 'session.c')
| -rw-r--r-- | session.c | 81 |
1 files changed, 75 insertions, 6 deletions
| @@ -234,7 +234,7 @@ typedef struct _php_ps_globals_53 { | |||
| 234 | } php_ps_globals_53; | 234 | } php_ps_globals_53; |
| 235 | 235 | ||
| 236 | #if PHP_VERSION_ID >= 50400 | 236 | #if PHP_VERSION_ID >= 50400 |
| 237 | typedef struct _php_session_rfc1867_progress_54_55 { | 237 | typedef struct _php_session_rfc1867_progress_54_55_56 { |
| 238 | 238 | ||
| 239 | size_t sname_len; | 239 | size_t sname_len; |
| 240 | zval sid; | 240 | zval sid; |
| @@ -252,7 +252,7 @@ typedef struct _php_session_rfc1867_progress_54_55 { | |||
| 252 | zval *files; /* data["files"] array */ | 252 | zval *files; /* data["files"] array */ |
| 253 | zval *current_file; /* array of currently uploading file */ | 253 | zval *current_file; /* array of currently uploading file */ |
| 254 | zval *current_file_bytes_processed; | 254 | zval *current_file_bytes_processed; |
| 255 | } php_session_rfc1867_progress_54_55; | 255 | } php_session_rfc1867_progress_54_55_56; |
| 256 | 256 | ||
| 257 | typedef struct _php_ps_globals_54 { | 257 | typedef struct _php_ps_globals_54 { |
| 258 | char *save_path; | 258 | char *save_path; |
| @@ -306,7 +306,7 @@ typedef struct _php_ps_globals_54 { | |||
| 306 | int define_sid; | 306 | int define_sid; |
| 307 | zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ | 307 | zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ |
| 308 | 308 | ||
| 309 | php_session_rfc1867_progress_54_55 *rfc1867_progress; | 309 | php_session_rfc1867_progress_54_55_56 *rfc1867_progress; |
| 310 | zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ | 310 | zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ |
| 311 | zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ | 311 | zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ |
| 312 | smart_str rfc1867_prefix; /* session.upload_progress.prefix */ | 312 | smart_str rfc1867_prefix; /* session.upload_progress.prefix */ |
| @@ -370,7 +370,7 @@ typedef struct _php_ps_globals_55 { | |||
| 370 | int define_sid; | 370 | int define_sid; |
| 371 | zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ | 371 | zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ |
| 372 | 372 | ||
| 373 | php_session_rfc1867_progress_54_55 *rfc1867_progress; | 373 | php_session_rfc1867_progress_54_55_56 *rfc1867_progress; |
| 374 | zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ | 374 | zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ |
| 375 | zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ | 375 | zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ |
| 376 | smart_str rfc1867_prefix; /* session.upload_progress.prefix */ | 376 | smart_str rfc1867_prefix; /* session.upload_progress.prefix */ |
| @@ -380,11 +380,78 @@ typedef struct _php_ps_globals_55 { | |||
| 380 | 380 | ||
| 381 | zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ | 381 | zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ |
| 382 | } php_ps_globals_55; | 382 | } php_ps_globals_55; |
| 383 | |||
| 384 | typedef struct _php_ps_globals_56 { | ||
| 385 | char *save_path; | ||
| 386 | char *session_name; | ||
| 387 | char *id; | ||
| 388 | char *extern_referer_chk; | ||
| 389 | char *entropy_file; | ||
| 390 | char *cache_limiter; | ||
| 391 | long entropy_length; | ||
| 392 | long cookie_lifetime; | ||
| 393 | char *cookie_path; | ||
| 394 | char *cookie_domain; | ||
| 395 | zend_bool cookie_secure; | ||
| 396 | zend_bool cookie_httponly; | ||
| 397 | ps_module *mod; | ||
| 398 | ps_module *default_mod; | ||
| 399 | void *mod_data; | ||
| 400 | php_session_status session_status; | ||
| 401 | long gc_probability; | ||
| 402 | long gc_divisor; | ||
| 403 | long gc_maxlifetime; | ||
| 404 | int module_number; | ||
| 405 | long cache_expire; | ||
| 406 | union { | ||
| 407 | zval *names[7]; | ||
| 408 | struct { | ||
| 409 | zval *ps_open; | ||
| 410 | zval *ps_close; | ||
| 411 | zval *ps_read; | ||
| 412 | zval *ps_write; | ||
| 413 | zval *ps_destroy; | ||
| 414 | zval *ps_gc; | ||
| 415 | zval *ps_create_sid; | ||
| 416 | } name; | ||
| 417 | } mod_user_names; | ||
| 418 | int mod_user_implemented; | ||
| 419 | int mod_user_is_open; | ||
| 420 | const struct ps_serializer_struct *serializer; | ||
| 421 | zval *http_session_vars; | ||
| 422 | zend_bool auto_start; | ||
| 423 | zend_bool use_cookies; | ||
| 424 | zend_bool use_only_cookies; | ||
| 425 | zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ | ||
| 426 | zend_bool apply_trans_sid; /* whether or not to enable trans-sid for the current request */ | ||
| 427 | |||
| 428 | long hash_func; | ||
| 429 | #if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) | ||
| 430 | php_hash_ops *hash_ops; | ||
| 431 | #endif | ||
| 432 | long hash_bits_per_character; | ||
| 433 | int send_cookie; | ||
| 434 | int define_sid; | ||
| 435 | zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ | ||
| 436 | |||
| 437 | php_session_rfc1867_progress_54_55_56 *rfc1867_progress; | ||
| 438 | zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ | ||
| 439 | zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ | ||
| 440 | smart_str rfc1867_prefix; /* session.upload_progress.prefix */ | ||
| 441 | smart_str rfc1867_name; /* session.upload_progress.name */ | ||
| 442 | long rfc1867_freq; /* session.upload_progress.freq */ | ||
| 443 | double rfc1867_min_freq; /* session.upload_progress.min_freq */ | ||
| 444 | |||
| 445 | zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ | ||
| 446 | unsigned char session_data_hash[16]; /* binary MD5 hash length */ | ||
| 447 | } php_ps_globals_56; | ||
| 383 | #endif | 448 | #endif |
| 384 | 449 | ||
| 385 | #ifdef ZTS | 450 | #ifdef ZTS |
| 386 | static ts_rsrc_id session_globals_id = 0; | 451 | static ts_rsrc_id session_globals_id = 0; |
| 387 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5) | 452 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 6) |
| 453 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_56 *, v) | ||
| 454 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5) | ||
| 388 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_55 *, v) | 455 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_55 *, v) |
| 389 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) | 456 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) |
| 390 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_54 *, v) | 457 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_54 *, v) |
| @@ -400,7 +467,9 @@ static ts_rsrc_id session_globals_id = 0; | |||
| 400 | UNSUPPORTED PHP VERSION | 467 | UNSUPPORTED PHP VERSION |
| 401 | # endif | 468 | # endif |
| 402 | #else | 469 | #else |
| 403 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5) | 470 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 6) |
| 471 | static php_ps_globals_56 *session_globals = NULL; | ||
| 472 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5) | ||
| 404 | static php_ps_globals_55 *session_globals = NULL; | 473 | static php_ps_globals_55 *session_globals = NULL; |
| 405 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) | 474 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) |
| 406 | static php_ps_globals_54 *session_globals = NULL; | 475 | static php_ps_globals_54 *session_globals = NULL; |
