note 103585 added to ref.imap
| From: | Eelco at osu1 dot php dot net | Date: | Thu, 21 Apr 2011 09:41:19 +0000 |
| Subject: | note 103585 added to ref.imap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179040@lists.php.net to get a copy of this message | ||
I used the instructions from Chris (thanks Chris) to recompile the imap.so module for CentOS 5 (PHP
5.2.11). I didn't want to recompile all PHP extensions only imap.so.
So here is my version of recompiling imap.so for PHP 5.2.11 based on the instructions of Chris.
0) Install the dependencies
yum groupinstall "Development Tools"
yum install openssl-devel
yum install krb5 krb5-devel
yum install pam-devel
1) Create a temporary folder and cd to it.
# mkdir ~/php-imap && cd ~/php-imap
2) Download c-client.tar.Z
# wget ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
3) Extract the c-client.tar.Z file, which would create the imap-2007e folder at this moment.
# tar -zxf c-client.tar.Z
4) Download php source code using. Use the version of the php installed on the machine (php
--version)
Extract the php-*.rpm file to get the php-*.tar.bz2 source package
# wget http://3es.atomicrocketturtle.com/packages/
php/php-5.2.11-3.art.src.rpm
# rpm2cpio php-5.2.11-3.art.src.rpm | cpio -idmv
# tar xvjf php-5.2.11.tar.bz2
5) Install php-imap plugin using or you can simply just add the php ini file for the imap.so
extension
# sudo yum install php-imap
6) Go to the imap-2007e folder and edit the Makefile such that the 'EXTRACFLAGS=' line
reads: 'EXTRACFLAGS=-fPIC'
7) Compile c-client.
# make lr5 IP6=4
8) Go to the php source folder and run the configure script with the following arguments:
# ./configure --disable-all --with-imap=shared,<path to imap-2007e folder> --with-imap-ssl
--with-openssl=/usr
9) Compile php
# make
10) Copy/replace the imap.so file from the ./modules folder to the php module folder.
# sudo cp ./modules/imap.so /usr/lib64/php/modules
11) Restart Apache
# sudo /etc/init.d/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!
----
Server IP: 69.147.83.197
Probable Submitter: 87.213.165.50
----
Manual Page -- http://www.php.net/manual/en/ref.imap.php
Edit -- https://master.php.net/note/edit/103585
Del: integrated -- https://master.php.net/note/delete/103585/integrated
Del: useless -- https://master.php.net/note/delete/103585/useless
Del: bad code -- https://master.php.net/note/delete/103585/bad+code
Del: spam -- https://master.php.net/note/delete/103585/spam
Del: non-english -- https://master.php.net/note/delete/103585/non-english
Del: in docs -- https://master.php.net/note/delete/103585/in+docs
Del: other reasons-- https://master.php.net/note/delete/103585
Reject -- https://master.php.net/note/reject/103585
Search -- https://master.php.net/manage/user-notes.php