How to Install PHP-Imap

sohaib

Verified User
Joined
Apr 27, 2005
Messages
189
Location
Shared & Dedicated Hosting
------ Be sure theses packages are installed on your server with

Install this first before doing anything

yum -y install libc-client-devel.i386 rpm


1: Go to the DA custombuild directory

cd /usr/local/directadmin/custombuild

2: Edit configure/ap2/configure.php5

nano configure/ap2/configure.php5

3: Add the next 2 lines at the end of the file. Be sure that ONLY the last options have no "\" at the end and save (CTRL-O) and quit (CTRL-Q)

--with-imap=/usr/lib/dovecot/imap \
--with-imap-ssl

4: Re-compilling PHP

./build php n

5: Restart apache

/sbin/service httpd restart

And you have PHP-Imap Installed.

Thank you.
 
ok now i decide to post, this post don't work

checking for IMAP support... no
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... no

after rebuild IMAP not activate.
 
Try

Code:
yum -y install libc-client-devel libc-client

...

4: Re-compilling PHP

./build php n

5: Restart apache

/sbin/service httpd restart
 
Your PHP is compiled without support of imap:

Code:
Configure Command 	'./configure' '--prefix=/usr/local/php5' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-config-file-path=/usr/local/etc/php5/cgi' '--with-curl=/usr/local/lib' '--with-gd' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr/local/mysql' '--with-mysqli=/usr/local/bin/mysql_config' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=/usr/local/mysql' '--with-pear=/usr/local/lib/php' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--with-openssl' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-magic-quotes' '--enable-soap' '--enable-sockets' '--enable-mbstring' '--enable-zip' '--enable-wddx'

Which file did you modified?

You should for PHP-CGI modify /usr/local/directadmin/custombuild/custom/suphp/configure.php5 if you have no the file copy it from /usr/local/directadmin/custombuild/configure/suphp/configure.php5 and add there instructions for imap.
 
Thats what i have did,
cat /usr/local/directadmin/custombuild/custom/suphp/configure.php5
#!/bin/sh
./configure \
--with-apxs2 \
--with-curl=/usr/local/lib \
--with-gd \
--with-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/bin/mysql_config \
--with-pdo-mysql=/usr/local/mysql \
--with-pcre-regex=/usr/local \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-magic-quotes \
--enable-safe-mode \
--enable-soap \
--enable-sockets \
--enable-mbstring \
--enable-zip \
--enable-wddx \
--with-imap=/usr/lib64 \
--with-imap-ssl

But does not work either...

Thanks for all the help
 
--with-imap=/usr/lib/dovecot/imap \
--with-imap-ssl


/usr/lib/dovecot/imap no such file or dir found in my server

can i use this?

--with-imap \
--with-imap-ssl
 
there is an script in to the DA help to autoinstall it to the build, but it seems a bit dated and it edits configure.php5... and on a first look (not a pro in dev) it compiles additional packages for what we hat packages now days so

So here how to add it to php-fpm 7.2 on centos 7 (if someone found that thread from a search engine)

Go to the

/usr/local/directadmin/custombuild/configure/fpm

choose the version configure file add, to the bottom (following the instructions from the previous post)

Code:
--with-imap \
--with-imap-ssl

Code:
yum install libc-client-devel libc-client uw-imap-devel uw-imap-static uw-imap-utils
* you may not need last 2 but i needed them


Code:
 ln -s /usr/lib64/libc-client.a /usr/lib/libc-client.a


Code:
./build php d
 
@DanielP, Thank you for sharing. I just want to point out that /usr/local/directadmin/custombuild/configure/fpm/configure.php7X will be overwritten by DirectAdmin, to avoid that you should create the folders and file at this path: /usr/local/directadmin/custombuild/custom/fpm/configure.php7X - then configure.php7X will never be overwritten. Just rember to set permission on configure.php7X file to be 755
 
I get the same error and I run PHP5.6 and PHP7.3.
Please help me soon!

Thanks in advanced.
 
This is some old post I assume, you can install imap extension with custombuild now
 
hi Active8,
I follow this guide: https://help.directadmin.com/item.php?id=341

But I always get the below message:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
Trying to make imap PHP extension...
make: *** No targets specified and no makefile found. Stop.
 
 
Back
Top