[imp] does IMP have to login into IMAP for every page?

Lord Apollyon implist at paypc.com
Sun Jan 30 05:12:47 PST 2005


> uhm... yes, maybe, but why do extra work by logging in many times and
> then do some more extra work by trying to optimize it? :)

You can't avoid these, alas, unless PHP provided for a safe and secure way to
maintain persistent connection pools with an end-to-end secure way for a
returning web-application to re-associate a given web session ID with the
persistent IMAP session.

Given the framework provided by PHP (not very well suited for this, alas),
this is a very difficult task with numerous issues which are not completely
obvious to just shallow thought on the matter.

To you as a user, the connection is "persistent", but in reality it only
exists during the time your web-browser is making requests of the server. 
>From moment to moment, that same apache process is handling your IMP request
one second or two, and another person's the next.  Each time, the imap
connections are brought up and torn down again.  When a php "application"
quits, all of its file and socket resources are closed (with very few
exceptions, and only when using specific api calls which cover a very limited
set of operating conditions).

=R=


More information about the imp mailing list