How do I Install and enable PHP modules

0
205
Enable IMAP extension

Welcome back to shortlearner.com, in our previous post we learn how to install Apache Web Server on CentOS.
today in this post we will see How do I Install and enable PHP modules.

so before start this tutorial we should take an small overview about PHP IMAP Module and its advantages.

Enable IMAP extension

What is IMAP.?

so basically IMAP is a mailbox with having a powerful and open source library to connect mailbox with POP3, IMAP and NNTP using the PHP IMAP extension.

in PHP by default the IMAP extension is disabled. so we are writing a PHP script for finding that PHP IMAP is installed or not.
so we are creating a file with the name of info.php . to find the information about PHP.

so after running this info.php file ,we got some out like below image.

PHP IMAP Extension

Enable IMAP in Xampp

just follow the below steps to enable IMAP extension in xampp.
1.go to the file \xampp\php\php.ini and open php.ini in your editor.
2. find ;extension=php_imap.dll
3. Remove semicolon from ;extension=php_imap.dll.
4. Now, now it should looks like extension=php_imap.dll
5. Save your file and restart the xampp server.

Enable IMAP in Linux

so if you are a linux user and want to enable IMAP in your server. so just follow the below steps for enabling it.
1. open your terminal and run the below commands.

sudo apt-get install php5-imap

2. for enabling IMAP use the follow command.

sudo php5enmod imap

3.after enable IMAP we should restart our webserver by following command.

service apache2 restart

Install IMAP on Ubuntu

sudo apt install php7.1-imap

after installing IMAP on PHP7.1 restart apache by below command.

sudo systemctl restart apache2

hope you also install and enable the PHP module by following all the above steps. if you still having any problem ,feel free to contact us.