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

Karolis Dautartas list at public.lt
Sun Jan 30 07:06:56 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? :)

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

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

LA> To you as a user, the connection is "persistent", but in reality it only
LA> 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
LA> one second or two, and another person's the next.  Each time, the imap
LA> connections are brought up and torn down again.  When a php "application"
LA> quits, all of its file and socket resources are closed (with very few
LA> exceptions, and only when using specific api calls which cover a very limited
LA> set of operating conditions).

I was actually referring to pages that do not need IMAP. Like
seettings pages or "create new mail" form or address book. You only
need to be authenticated, but there is no data that comes from IMAP
when you add an address book item.

These are probably used not as often as "inbox" or "Read mail", so....
maybe you are right :)

Karolis



More information about the imp mailing list