12

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

RoSe
  • 327
  • 4
  • 6
  • 20
  • 1
    are you sure you are altering the correct php.ini? You can check that using phpinfo() as well. http://www.php.net/manual/en/function.phpinfo.php – Andresch Serj Apr 23 '14 at 11:31
  • @AndreschSerj yes i am altering the correct php.ini file because i have changed other things too. It works fine – RoSe Apr 23 '14 at 11:36
  • Did you restarted the server ? – Vinod VT May 28 '14 at 07:35
  • For mac users using homebrew look there https://stackoverflow.com/questions/51433648/adding-imap-to-php-7-2-on-osx – vml Feb 13 '19 at 14:06

6 Answers6

12

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
cilap
  • 1,783
  • 1
  • 13
  • 46
3

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

Vinod VT
  • 6,250
  • 10
  • 47
  • 71
  • not the nice way to modify manually some config files which are managed by debian/ubuntu packaging tools or php-tools. – hkais Apr 20 '15 at 15:21
  • also forgot, since ubuntu 14.04 you have to restart your services with service apache2 restart – hkais Apr 20 '15 at 15:35
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.

Navneet
  • 307
  • 1
  • 10
2

For PHP7 on LAMP (in Ubuntu)

sudo apt-get install php7.0-imap
sudo service apache2 restart
Joe
  • 6,615
  • 3
  • 14
  • 21
1

on centos7 php7

yum install php-imap
Machavity
  • 28,730
  • 25
  • 78
  • 91
doapydave
  • 165
  • 1
  • 9
0

Step 1 Open This PC and go to this path mentioned below Yourdrive:\xampp\php(type : configuration Settings)

Step 2 Open This file in any editor and find ;extension=imap

Step 3 Remove ;(Comment) and save the file and close it.

Step 4 Restart Apache and Mysql from your xampp.

Step 5 Now you'll able to install Laravel-imap Library Open cmd (Command Prompt) in your project directory and run this command

composer require webklex/laravel-imap

Dhruv
  • 894
  • 4
  • 5