PHP
  Home arrow PHP arrow Using Session Handling Objects to Main...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Using Session Handling Objects to Maintain the State of Applications with PHP Sessions
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 22
    2006-05-10

    Table of Contents:
  • Using Session Handling Objects to Maintain the State of Applications with PHP Sessions
  • A procedural implementation of the “session_set_save_handler()” function
  • Developing an object-oriented session management module
  • Coding the session handling class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Session Handling Objects to Maintain the State of Applications with PHP Sessions


    (Page 1 of 4 )

    Here you have it. The tutorial that you were waiting for! Welcome to the concluding part of the series “Maintaining the state of applications with PHP sessions.” In several tutorials, this series goes through the key points of managing sessions in PHP, and explores some of their most advanced features, such as developing user-defined session storage modules and using session handling objects.

    Introduction

    If you’ve already read my two previous tutorials in this series, then probably you’ve expanded your knowledge of the basics of PHP session management, including the proper understanding of some of the core operations required for creating, using and destroying sessions.

    In addition, handling and propagating session IDs should be pretty familiar concepts to you, since I covered this topic in detail in the first tutorial. However, in order to get the most out of the PHP session management module, during the second article you learned how to build a custom session mechanism by utilizing the helpful “session_save_path()” and “session_set_save_handler()” functions. Specifically, the last function allows you to build an entirely customized session module. This module can potentially use MySQL (or other RDBMS) for saving session-related data, in this way increasing the security of the overall session handling mechanism.

    Well, if sessions were a foreign concept to you before reading these tutorials, now you have enough source code to experiment with yourself and start including advanced session scripts within your PHP applications. Nevertheless, the subject is certainly huge and deserves an in-depth look, particularly in those topics related to advanced session handling.

    Keeping this idea in mind, in this last part of the series, I’ll explain how to use the PHP built-in “session_set_save_handler()” function inside of a PHP class, in order to create highly-centralized session handling objects. Are you ready to learn how this will be done? Right, let’s go!

    More PHP Articles
    More By Alejandro Gervasio


       · Over the last part of this series, you´ll learn how to build session handling...
       · Hi Alejandro,In this series you've done an excellent job of illustrating how to...
       · Hi friend,Thank you for your kind comments on my PHP series. I really appreciate...
       · Hi again,I am on APache and can write .htaccess files, but what can I change in...
       · Hello Craig,The Apache site has a lot of info about .htacess files. There are...
       · Again you did some awesome work. I look forwark to read what you wrote on other...
       · Hi Sig again,I read your previous comment and I thank for you for this one too....
     

       

    PHP ARTICLES

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway