diff options
Diffstat (limited to 'session.c')
| -rw-r--r-- | session.c | 80 |
1 files changed, 75 insertions, 5 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 { | 237 | typedef struct _php_session_rfc1867_progress_54_55 { |
| 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 { | |||
| 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; | 255 | } php_session_rfc1867_progress_54_55; |
| 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 *rfc1867_progress; | 309 | php_session_rfc1867_progress_54_55 *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 */ |
| @@ -316,9 +316,77 @@ typedef struct _php_ps_globals_54 { | |||
| 316 | } php_ps_globals_54; | 316 | } php_ps_globals_54; |
| 317 | #endif | 317 | #endif |
| 318 | 318 | ||
| 319 | #if PHP_VERSION_ID >= 50500 | ||
| 320 | typedef struct _php_ps_globals_55 { | ||
| 321 | char *save_path; | ||
| 322 | char *session_name; | ||
| 323 | char *id; | ||
| 324 | char *extern_referer_chk; | ||
| 325 | char *entropy_file; | ||
| 326 | char *cache_limiter; | ||
| 327 | long entropy_length; | ||
| 328 | long cookie_lifetime; | ||
| 329 | char *cookie_path; | ||
| 330 | char *cookie_domain; | ||
| 331 | zend_bool cookie_secure; | ||
| 332 | zend_bool cookie_httponly; | ||
| 333 | ps_module *mod; | ||
| 334 | ps_module *default_mod; | ||
| 335 | void *mod_data; | ||
| 336 | php_session_status session_status; | ||
| 337 | long gc_probability; | ||
| 338 | long gc_divisor; | ||
| 339 | long gc_maxlifetime; | ||
| 340 | int module_number; | ||
| 341 | long cache_expire; | ||
| 342 | union { | ||
| 343 | zval *names[7]; | ||
| 344 | struct { | ||
| 345 | zval *ps_open; | ||
| 346 | zval *ps_close; | ||
| 347 | zval *ps_read; | ||
| 348 | zval *ps_write; | ||
| 349 | zval *ps_destroy; | ||
| 350 | zval *ps_gc; | ||
| 351 | zval *ps_create_sid; | ||
| 352 | } name; | ||
| 353 | } mod_user_names; | ||
| 354 | int mod_user_implemented; | ||
| 355 | int mod_user_is_open; | ||
| 356 | const struct ps_serializer_struct *serializer; | ||
| 357 | zval *http_session_vars; | ||
| 358 | zend_bool auto_start; | ||
| 359 | zend_bool use_cookies; | ||
| 360 | zend_bool use_only_cookies; | ||
| 361 | zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ | ||
| 362 | zend_bool apply_trans_sid; /* whether or not to enable trans-sid for the current request */ | ||
| 363 | |||
| 364 | long hash_func; | ||
| 365 | #if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) | ||
| 366 | php_hash_ops *hash_ops; | ||
| 367 | #endif | ||
| 368 | long hash_bits_per_character; | ||
| 369 | int send_cookie; | ||
| 370 | int define_sid; | ||
| 371 | zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ | ||
| 372 | |||
| 373 | php_session_rfc1867_progress_54_55 *rfc1867_progress; | ||
| 374 | zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ | ||
| 375 | zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ | ||
| 376 | smart_str rfc1867_prefix; /* session.upload_progress.prefix */ | ||
| 377 | smart_str rfc1867_name; /* session.upload_progress.name */ | ||
| 378 | long rfc1867_freq; /* session.upload_progress.freq */ | ||
| 379 | double rfc1867_min_freq; /* session.upload_progress.min_freq */ | ||
| 380 | |||
| 381 | zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ | ||
| 382 | } php_ps_globals; | ||
| 383 | #endif | ||
| 384 | |||
| 319 | #ifdef ZTS | 385 | #ifdef ZTS |
| 320 | static ts_rsrc_id session_globals_id = 0; | 386 | static ts_rsrc_id session_globals_id = 0; |
| 321 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) | 387 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5) |
| 388 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_55 *, v) | ||
| 389 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) | ||
| 322 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_54 *, v) | 390 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_54 *, v) |
| 323 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) | 391 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) |
| 324 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_53 *, v) | 392 | # define SESSION_G(v) TSRMG(session_globals_id, php_ps_globals_53 *, v) |
| @@ -332,7 +400,9 @@ static ts_rsrc_id session_globals_id = 0; | |||
| 332 | UNSUPPORTED PHP VERSION | 400 | UNSUPPORTED PHP VERSION |
| 333 | # endif | 401 | # endif |
| 334 | #else | 402 | #else |
| 335 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) | 403 | # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5) |
| 404 | static php_ps_globals_55 *session_globals = NULL; | ||
| 405 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) | ||
| 336 | static php_ps_globals_54 *session_globals = NULL; | 406 | static php_ps_globals_54 *session_globals = NULL; |
| 337 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) | 407 | # elif (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) |
| 338 | static php_ps_globals_53 *session_globals = NULL; | 408 | static php_ps_globals_53 *session_globals = NULL; |
