Its prototype follows:
session.use_cookies = 0|1
Keep in mind that when session.use_cookies is enabled, there is no need to explicitly
call a cookie-setting function (via PHP??™s set_cookie(), for example), because this
will be automatically handled by the session library. If you choose cookies as the method
for tracking the user??™s SID, then there are several other directives that you must consider,
each of which is introduced in the following entries.
Automating URL Rewriting
If session.use_cookies is disabled, the user??™s unique SID must be attached to the URL
in order to ensure ID propagation. This can be handled either explicitly, by manually
CHAPTER 18 ?– SESSION HANDLERS 451
appending the variable $SID to the end of each URL, or automatically, by enabling the
directive session.use_trans_sid. Its prototype follows:
session.use_trans_sid = 0|1
Not surprisingly, if you commit to using URL rewrites, you should enable this
directive to eliminate the possibility of human error during the rewrite process.
Setting the Session Cookie Lifetime
The session.cookie_lifetime directive determines the session cookie??™s period of
validity. Its prototype follows:
session.cookie_lifetime = integer
The lifetime is specified in seconds, so if the cookie should live 1 hour, then this
directive should be set to 3600. If this directive is set to 0 (the default), then the cookie
will live until the browser is restarted.
Pages:
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531