PDA

View Full Version : Php With Imap Support On Freebsd - How To


Senad
12-14-2005, 06:31 PM
Ok, so linux has php with imap support and today I've spent a few hours figuring it out.

Credits: As always thanks to the DirectAdmin support team for helping along the way :D.

NOTE: WE ARE BUILDING IT WITH SSL SUPPORT!


cd /home

mkdir build

cd build

wget http://files.directadmin.com/services/imapback.tar.gz

tar -zxvf imapback.tar.gz

cd imap-2002e

make bsf

You will get some error messages and it won't fully build...not a problem. We will fix it by doing the following:


cd c-client

nano LDFLAGS


remove everything and add:

-lcrypt -L/usr/lib -lssl -lcrypto


Now run

make bsf


again....

code should install properly..

Now we want to:


cd c-client

make bsf EXTRACFLAGS=-I/usr/src/kerberos5/include EXTRALDFLAGS=-I/usr/src/kerberos5/lib


NOTE ON THE EXTRACT FLAGS!! MAKE SURE THAT THIS IS THE RIGHT DIRECTORY! do a locate kerberos to find the directory as it may not be kerberos5 for you!

back to the how-to :)....



mkdir /usr/local/imap-2000e/

mkdir /usr/local/imap-2000e/lib

mkdir /usr/local/imap-2000e/include

cp *.h /usr/local/imap-2000e/include

cp *.c /usr/local/imap-2000e/lib

cp c-client.a /usr/local/imap-2000e/lib

mv /usr/local/imap-2000e/lib/c-client.a /usr/local/imap-2000e/lib/libc-client.a

cd /usr/local/directadmin/customapache

nano -w configure.php (Add --with-imap=/usr/local/imap-2000e \ to php config)

./build php n


./build php n will only update and build php if you do ./build php you can build all of the components it requires again (if there are any new ones).


Also you will need to restart apache and may need to restart imap and pop3 (as was my case).

pera
05-19-2006, 03:06 AM
Thank you it help me to install imap support för sugarcrm. But I had one change:

make bsf EXTRACFLAGS=-I/usr/include EXTRALDFLAGS=-I/usr/lib

I am using FreeBSD 6.0

knoll
08-11-2008, 10:43 AM
works on freebsd 6.3 also ;)