News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
Trick-out Your Session Handler
April 11, 2006 @ 06:55:45

There's one thing that coders look for when they get past the most basic bits of PHP - a way to store information between the requests. Thankfully, PHP has that functionality build in (for quite a while now, actually) and it's very easy to use. Sessions make storing data simple and, according to this new post on the Zend Developer Zend, there's even more fun things you can get them to do - with the right convincing.

By default, session data is stored on the filesystem in individual files. This works fine for most people, but when it comes to storing session data, PHP has several options available. This article will discuss some of the built-in options for session storage and also show you how to write your own session handler.

They cover some of the options that you can alter (in the php.ini) to change the defaults for your sessions, including where they're written to. With those basics out of the way, the real meat of the tutorial comes in - the creation of a custom session handler. They base theirs on a few simple functions like open, read, write, destroy, etc. There's no code for those functions, but they do provide good descriptions for what they should do. To wrap it all up, they give the "howto" on actually using this functionality in your application.

0 comments voice your opinion now!
session handler custom settings location session handler custom settings location


blog comments powered by Disqus

Similar Posts

ITNewb.com: Generating Session IDs and Random Passwords with PHP

Chance Garcia's Blog: More Live Blogging from TEKX 2010

Zend Developer Zone: ZendCon Sessions Episode 037: Why MVC is not an Application Architecture

DevShed: Enhancing a URL Handling Helper Class in PHP 5

Sebastian Bergmann's Blog: thePHP.cc at IPC 2010


Community Events





Don't see your event here?
Let us know!


developer laravel configure wordpress install podcast interview application threedevsandamaybe series community bugfix language list release api symfony introduction library code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework