macromedia.dreamweaver.appdev
[Top] [All Lists]

Re: Session variables - what's up?

Subject: Re: Session variables - what's up?
From: "Murray *ACE*"
Date: Tue, 11 Dec 2007 14:16:24 -0500
Newsgroups: macromedia.dreamweaver.appdev


Excellent - that's how to do it!  Thanks for the hints!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Michael Fesser" <netizen@xxxxxx> wrote in message news:6fntl3tn7qm6ldcph5jpmt855s58nj4as1@xxxxxxxxxx
.oO(Murray *ACE*)

Host has already fixed it.  Nice service!

Great.

Just for completeness: In order to use your own directory for session
storage, you just create it where you're allowed to and pass the full
path to session_save_path().

In my own session handler I define a path constant, which is based on
$_SERVER['DOCUMENT_ROOT'] and contains the full path to the directory
where I want my session data to be. Then I simply let my script check if
the directory exists and create it if necessary:

 ...
 if (!file_exists(EMLIB_APP_SESSION_PATH)) {
   mkdir(EMLIB_APP_SESSION_PATH, 0700, TRUE);
 }
 ini_set('session.auto_start', 0);
 ini_set('session.use_cookies', 0);
 ini_set('session.use_trans_sid', 0);
 session_save_path(EMLIB_APP_SESSION_PATH);
 ...

Micha


<Prev in Thread] Current Thread [Next in Thread>