Exercises

  1. If cookies are disabled on a visitor's machine, should you try using sessions?

  2. Sessions are terminated when your visitor navigates away from your site: true or false?

  3. Because sessions are stored on your server, they are more secure: true or false?

  4. You always need to call serialize() before storing an array in a session: true or false?

  5. Which php.ini directive allows you to specify how long a session should be considered active?

    • a) lifetime

    • b) maxlifetime

    • c) gc_maxlifetime

    • d) session.lifetime

    • e) session.maxlifetime

    • f) session.gc_maxlifetime

    • g) None of the above

  6. If you are using a custom session data handler, what should the session read function return if no data exists for the current session?

 

Next chapter: Further reading >>

Previous chapter: Summary

Jump to:

 

Home: Table of Contents

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar