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

- 447
- 4
- 7
- 20
-
1are 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 Answers
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

- 2,215
- 1
- 25
- 51
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

- 6,946
- 11
- 51
- 75
-
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
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.

- 347
- 1
- 10
For PHP7 on LAMP (in Ubuntu)
sudo apt-get install php7.0-imap
sudo service apache2 restart

- 8,251
- 3
- 18
- 23
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

- 1,960
- 1
- 6
- 6