As an Amazon Associate We earn from qualifying purchases.

How to Install PHP IMAP on CentOS

PHP Imap is a open source library to connect mailbox. It enables to fetch emails from your server. Its a necessary extension if you want web applications to handle your incoming mails.

If you are using Centos Web Panel in your VPS or Dedicated server you need install PHP Imap to properly use your mail server. You will notice that this feature wont show in PHP.ini or in PHP Version Switcher if not installed from SSH.

Step 1 : Login to putty or any SSH client using your root credentials and run the following command

sudo yum install php-imap

The output will be like this

[[email protected] ~]# sudo yum install php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  18 kB     00:00
 * base:
 * epel:
 * extras:
 * updates:
base                                                     | 3.6 kB     00:00
cwp                                                      | 2.9 kB     00:00
epel                                                     | 4.7 kB     00:00
extras                                                   | 2.9 kB     00:00
mariadb                                                  | 2.9 kB     00:00
updates                                                  | 2.9 kB     00:00
(1/2): epel/x86_64/updateinfo                              | 1.0 MB   00:00
(2/2): epel/x86_64/primary_db                              | 6.8 MB   00:03
Resolving Dependencies
--> Running transaction check
---> Package php-imap.x86_64 0:5.4.16-9.el7 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-imap-5.4.16-9.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-imap-5.4.16-9.el7.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-48.el7 will be installed
--> Processing Dependency: for package: php-common-5.4.16-48.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                      Arch                                     Version                                           Repository                              Size
 php-imap                                     x86_64                                   5.4.16-9.el7                                      epel                                    38 k
Installing for dependencies:
 libzip                                       x86_64                                   0.10.1-8.el7                                      base                                    48 k
 php-common                                   x86_64                                   5.4.16-48.el7                                     base                                   565 k

Transaction Summary
Install  1 Package (+2 Dependent packages)

Total download size: 652 k
Installed size: 4.0 M
Is this ok [y/d/N]:

Press y and then enter to proceed with the installation. If there is no issue you see a success message that PHP Imap Installation is Complete.

PHP IMAP Installation Confirmation - Centos Web Panel
Installing PHP Imap

After this you should restart the server with below command


You will be able to use the fuctions on PHP Imap after reboot.

Show More

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button