How can enable imap in php.ini

41,028

Solution 1

On Ubuntu and debian a better way is to enable it this way:

sudo apt install php-imap
sudo phpenmod imap
sudo service apache2 restart

On CentOS7+

sudo yum install php-imap

On Ubuntu (<= 14.04) and debian (<= Weezy)

sudo apt-get install php5-imap
sudo php5enmod imap
sudo service apache2 restart

Solution 2

If you are using LAMP server,

First install IMAP using the command on terminal

$ sudo apt-get install php5-imap

Then add this extension=imap.so code to your php.ini file

Restart your server,

$ sudo /etc/init.d/apache2 restart

It will work

Solution 3

sudo apt-get purge php5
sudo apt-get install php5=5.5.9+dfsg-1ubuntu4
sudo apt-get install php5-imap php5-curl

add in php.ini

extension=imap.so


extension=curl.so

reload and restart apache2. clear all your browser history. And Check than. it may be help.

Solution 4

For PHP7 on LAMP (in Ubuntu)

sudo apt-get install php7.0-imap
sudo service apache2 restart

Solution 5

on centos7 php7

yum install php-imap
Share:
41,028
RoSe
Author by

RoSe

Updated on July 09, 2022

Comments

  • RoSe
    RoSe almost 2 years

    I was trying to install vtiger in my server for installing vtiger we need to enable imap I tried to enable imap using php.ini by removing ; from extension=php_imap.dll but this does not work. Installing page still showing that imap is not enabled. Can i enable this using any php function. Any help will be greatly appreciated

  • hkais
    hkais about 9 years
    not the nice way to modify manually some config files which are managed by debian/ubuntu packaging tools or php-tools.
  • hkais
    hkais about 9 years
    also forgot, since ubuntu 14.04 you have to restart your services with service apache2 restart
  • Bogdan
    Bogdan almost 4 years
    sudo apt-get install php-imap seems to do a better job