PHP Sessions


  1. An attacker somehow obtains an unsuspecting user’s SID and then using it to impersonate the user in order to gain potentially sensitive information. This attack is known as..











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    You can minimize this risk by regenerating the session ID on each request while maintaining the session-specific data. PHP offers a convenient function named session_regenerate_id() that will replace the existing ID with a new one.


  1. Which parameter determines whether the old session file will also be deleted when the session ID is regenerated?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    By default, this behavior is disabled.



  1. Which function effectively deletes all sessions that have expired?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    session_garbage_collect()


  1. Which function is used to transform PHP’s session-handler behavior into that defined by your custom handler?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    session_set_save_handler()



  1. The session_start() function must appear..











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Like this: