[imp] IMP and POP3 support

Jon Parise jon@horde.org
Sat Nov 16 03:28:09 2002


On Tue, Oct 29, 2002 at 02:13:23PM -0800, Andrew Morgan wrote:

> > I've run sessions from an PostgreSQL database for quite a while.  My
> > handler is located here:
> >
> >     http://www.csh.rit.edu/~jon/projects/pgsql_session_handler/
> 
> I ended up writing a cross between your pgsql session handler and Ying
> Zhang's mysql session handler.  My version is attached to this message.
> 
> I have a few questions about your session handler:
> 
> 1. Doesn't using addslashes($val) on the session write modify the session
> data?  Does PHP automatically remove the slashes later when the
> application tries to use the session data?

Good question.  Looking back as the code, I don't actually recall the
answer (I don't do much database work right now).  I believe the
addslashes() calls are primary for the database; the slashes aren't
actually stored, but they keep the SQL query string intact.
 
> 2. Why do you add a session if one is not found in session_read?

That's an even better question.  I believe that part of the code was
contributed from some other party, and I don't recall why that's
there.  If I can to guess, I would say it has to do with ensuring a
row of session data will already exist when a session_write() is
performed.
 
> How do I integrate this with my Horde installation?  Should I add this to
> auto_prepend_file in php.ini?
 
That's one method (the one I usually use).  An .htaccess file also
works well.

-- 
Jon Parise (jon@horde.org) :: The Horde Project (http://horde.org/)


More information about the imp mailing list