Method: 1. Install dependency packages; 2. Execute phpize and configure under "ext/imap" of the php installation package; 3. Execute the "make && make install" command; 4. In php.ini Remove the semicolon before "extension=imap" and restart the service.
The operating environment of this tutorial: Centos 7 system, php7.4 version, DELL G3 computer
php 7.4 installation imap extension
Install dependency packages (Centos 7 environment)
yum install autoconf gcc gcc-c++ krb5-devel openssl-devel yum install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libc-client-2007f-16.el7.x86_64.rpm yum install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/u/uw-imap-devel-2007f-16.el7.x86_64.rpm
If the above method is very slow to download, you can download the corresponding file first,
and then enter the file location directory, execute the following command for offline installation
rpm -ivh *.rpm ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
Enter the ext/imap directory of the corresponding version of the php installation package, as follows
cd /usr/local/src/php-7.4.8/ext/imap
Execute phpize
/usr/local/php/bin/phpize
in the ext/imap directory Execute configure
./configure --with-php-config=/usr/local/php/bin/php-config --with-imap --with-imap-ssl --with-kerberos
Compile and install
make && make install
Edit the php.ini file, remove the semicolon in front of extension=imap, and restart the PHP service
Recommended learning: " PHP video tutorial》
The above is the detailed content of How to install imap extension in php. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
