note 51884 added to ref.imap

From: Date: Wed, 13 Apr 2005 19:13:41 +0000
Subject: note 51884 added to ref.imap
Groups: php.notes 
Request: Send a blank email to php-notes+get-87977@lists.php.net to get a copy of this message
If you are having difficulty compiling on netbsd from source and want imap support then you should know that the c-client library is compiled with kerberos support. Unfortunately gssapi_krb5 and k5crypto is not on the system (or at least wasn't for me). I didn't have administrative level access to add these libraries so I had to do the following. I still have to test that it worked 100% but at least it compiled without complaining. Comment the following segments from the configure script. Segment 1 -- test for gssapi_krb5 library case gssapi_krb5 in c|c_r|pthread*) ;; *) if test "$ext_shared" = "yes"; then IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lgssapi_krb5" else case gssapi_krb5 in c|c_r|pthread*) ;; *) LIBS="$LIBS -lgssapi_krb5" ;; esac fi ;; esac Segment 2 -- test for k5crypto case k5crypto in c|c_r|pthread*) ;; *) if test "$ext_shared" = "yes"; then IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lk5crypto" else case k5crypto in c|c_r|pthread*) ;; *) LIBS="$LIBS -lk5crypto" ;; esac fi ;; esac BTW. Since I was only compiling for the modules (they have suPHP so I compile all my own modules when I need them) I only dropped this in for the php configure script parameters ./configure --with-imap=shared,xxxxxx --with-kerberos=xxxxxx --with-imap-ssl This is verified working via an imap test. One excellent test that I located on the phpbuilder.com site. Here it is. Modify the address, port, protocol type, username, and password appropriately. The post was 5 years old but the script still works fine. The posters name was "Matthew" <HTML> <HEAD> <TITLE>imap_check</TITLE> </HEAD> <BODY> <? //check for new messages $mailbox = imap_open("{localhost/pop3:110}INBOX", "#username#","#password#"); // Check messages $check = imap_check($mailbox); print("<PRE>"); print("Date most recent message : " . $check->Date); print("<BR>"); print("Connection type : " . $check->Driver); print("<BR>"); print("Name of the mailbox : " . $check->Mailbox); print("<BR>"); print("Number of messages : " . $check->Nmsgs); print("<BR>"); print("Number of recent messages : " . $check->Recent); print("<BR>"); print("</PRE>"); // show headers for messages $index=1; $header = imap_header($mailbox, $index); print("<PRE>"); print("Header Date : " . $header->Date . "<BR>"); print("Header To : " . $header->to) . "<BR>"; print("Header From : " . $header->From . "<BR>"); print("Header cc : " . $header->cc . "<BR>"); print("Header ReplyTo : " . $header->ReplyTo . "<BR>"); print("Header Subject : " . $header->Subject . "<BR></PRE>"); print("<PRE>"); print(imap_body($mailbox,$index)); print("</PRE><HR>"); imap_close($mailbox); ?> </BODY></HTML> ---- Manual Page -- http://www.php.net/manual/en/ref.imap.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51884 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51884&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51884&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51884&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51884&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51884&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51884&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87977) next »