Home > Backend Development > PHP Problem > How to install imap extension in php

How to install imap extension in php

青灯夜游
Release: 2023-03-08 14:32:01
Original
4504 people have browsed it

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.

How to install imap extension in php

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
Copy after login

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
Copy after login

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
Copy after login

Execute phpize

/usr/local/php/bin/phpize
Copy after login

in the ext/imap directory Execute configure

./configure --with-php-config=/usr/local/php/bin/php-config --with-imap --with-imap-ssl --with-kerberos
Copy after login

Compile and install

make && make install
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template