note 101712 added to ref.imap

From: Date: Thu, 06 Jan 2011 12:57:05 +0000
Subject: note 101712 added to ref.imap
Groups: php.notes 
Request: Send a blank email to php-notes+get-175487@lists.php.net to get a copy of this message
The IMAP php plugin doesn't work by default with Microsoft Exchange 2007 server, so I had to recompile php with the c-client without Kerberos support. Also, I wanted to compile it as a shared library (imap.so). The quick and easy way that I've used to do this on Fedora Core 13 & 14 x64 was: 1) Create a temporary folder and cd to it. 2) Download c-client.tar.Z from ftp://ftp.cac.washington.edu/imap/ 3) Extract the c-client.tar.Z file, using 'tar -zxf c-client.tar.Z', which would create the imap-2007e folder at this moment. 4) Download php source code using 'yumdownloader --source php' *(a) Extract the php-*.rpm file to get the php-*.tar.bz2 source package *(b) 5) Install php-imap plugin using 'sudo yum install php-imap', or you can simply just add the php ini file for the imap.so extension 6) Go to the imap-2007e folder and edit the Makefile such that the 'EXTRACFLAGS=' line reads: 'EXTRACFLAGS=-fPIC' 7) Compile c-client. I had to use 'make lfd IP6=4' 8) Go to the php source folder and run the configure script with the following arguments: './configure --with-imap=shared,<path to imap-2007e folder> --with-imap-ssl' eg. I used './configure --with-imap=shared,/home/chris/imap-2007e --with-imap-ssl' 9) Compile php by simply running 'make' *(c) 10) Copy/replace the imap.so file from the ./modules folder to your PC's php module folder. I used 'sudo cp ./modules/imap.so /usr/lib64/php/modules' 11) Restart Apache: 'sudo service httpd restart' 12) Check imap section of <?php phpinfo(); ?>, and it should only list IMAP c-Client Version and SSL Support. The Kerberos Support should NOT be listed here! There are slight differences in achieving the same in Ubuntu 10.04 x64 (or perhaps other versions too): 4) Download php source code using 'apt-get source php5', which will create a php5-* source folder 5) Install the php5-imap plugin using 'sudo apt-get install php5-imap' 7) Compile c-client. I had to use 'make ldb IP6=4' 10) Copy/replace the imap.so file from the ./modules folder to your PC's php folder. I used 'sudo cp ./modules/imap.so /usr/lib64/php5/20090626' 11) Restart Apache: 'sudo service apache2 restart' * Notes: (a) yumdownloader is part of yum-utils package, which can be installed using 'yum install yum-utils' (b) You can extract the rpm file using 'rpm2cpio php-*.src.rpm | cpio -idmv' (c) You can greatly improve the compilation speed on a multi-core PC using 'make -j grep -c ^processor /proc/cpuinfo' ---- Server IP: 69.147.83.197 Probable Submitter: 41.134.19.138 ---- Manual Page -- http://www.php.net/manual/en/ref.imap.php Edit -- https://master.php.net/note/edit/101712 Del: integrated -- https://master.php.net/note/delete/101712/integrated Del: useless -- https://master.php.net/note/delete/101712/useless Del: bad code -- https://master.php.net/note/delete/101712/bad+code Del: spam -- https://master.php.net/note/delete/101712/spam Del: non-english -- https://master.php.net/note/delete/101712/non-english Del: in docs -- https://master.php.net/note/delete/101712/in+docs Del: other reasons-- https://master.php.net/note/delete/101712 Reject -- https://master.php.net/note/reject/101712 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175487) next »