IMAP, krb4, PHP4 and IMP
Liam Hoekenga
liamr@umich.edu
Fri, 4 May 2001 10:54:29 -0400 (EDT)
I'm trying to use UW IMAP c-client w/ the kerberos v4 patches with PHP
4.0.x and IMP 2.2.x. The combination of IMP 2.1 and PHP 3.0.x is quite
easily kerberized.
I've tried both IMAP 4.7c and IMAP2000 - both the c-clients build fine. I
had some problems getting IMAP 4.7c working with PHP4, but I've confirmed
that it does work (I can open IMAP streams using a clear text password).
IMAP2000 works as well. The IMAP 4.7c c-client works as intended with PHP
3.0.x.
here's the problem..
if the environment KRBTKFILE is set, and points to a valid krb4 ticket
file, the krb4 patched c-client should automatically recognize this use
that ticket file when trying to open IMAP connections.
This works in PHP 3.0.x. PHP 4.0.x seems to be ignoring the ticket file
(or more likely the environment variable). I'm setting it by adding this
to an auto prepend file..
<?php
$krbtkfile = "/ticket/kerb." . getenv("REMOTE_USER");
putenv("KRBTKFILE=$krbtkfile");
?>
Works fine in PHP 3.0.x, but not in 4.0.4x or 4.0.5 (tho, in PHP 3.0.x
c-client seems to cache KRBTKFILE erroneously when used as an apache
server module, so we have to use it in CGI mode).
Is there another way to get KRBTKFILE into a part of the environment where
PHP will pay attention to it? Anyone have any suggestions? I'm at a
loss.
thanks
Liam Hoekenga
UM Webmaster Team