title: How to enable PHP IMAP for php5-fpm / NGINX?
body: <p>We have a NGINX server running on Ubuntu 14.04.2 LTS with php5-fpm.</p>
  
  <p>An application <em>(<a href="http://octeth.com/" rel="nofollow noreferrer">OEMPRO</a>)</em> I'm trying to install on it says:</p>
  
  <blockquote>
    <p>PHP IMAP extension is disabled. Please enable it.</p>
  </blockquote>
  
  <p>How can I enable PHP IMAP?</p>
  
  <p>I've checked our <code>phpinfo</code> and it seems that IMAP is there in some way, you can see a screen shot of our <a href="https://i.stack.imgur.com/8xrTN.jpg" rel="nofollow noreferrer">phpinfo here</a>.</p>
  
  <p>Although, I couldn't find IMAP in the <code>mods-available/</code> directory.</p>
  
  <pre><code># ls /etc/php5/mods-available/
  curl.ini  gd.ini  json.ini  mcrypt.ini  mysqli.ini  mysql.ini  opcache.ini  pdo.ini  pdo_mysql.ini  readline.ini  ssh2.ini
  </code></pre>
  
  <p>Do I need to enable it in <code>/etc/php5/fpm/php.ini</code>?</p>
  
  <hr>
  
  <h2>UPDATE</h2>
  
  <p>I tried installing IMAP but it doesn't resolve the issue.  OEMPRO still says the IMAP is disabled.</p>
  
  <pre><code># sudo apt-get install php5-imap
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    libassuan0 libgeoip-dev libgpgme11 libtokyocabinet9
  Use 'apt-get autoremove' to remove them.
  The following NEW packages will be installed:
    php5-imap
  0 upgraded, 1 newly installed, 0 to remove and 235 not upgraded.
  Need to get 31.7 kB of archives.
  After this operation, 158 kB of additional disk space will be used.
  Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe php5-imap amd64 5.4.6-0ubuntu5 [31.7 kB]
  Fetched 31.7 kB in 0s (0 B/s)  
  Selecting previously unselected package php5-imap.
  (Reading database ... 60704 files and directories currently installed.)
  Preparing to unpack .../php5-imap_5.4.6-0ubuntu5_amd64.deb ...
  Unpacking php5-imap (5.4.6-0ubuntu5) ...
  Setting up php5-imap (5.4.6-0ubuntu5) ...
  # service php5-fpm restart
  php5-fpm stop/waiting
  php5-fpm start/running, process 2840
  # sudo service nginx restart
  * Restarting nginx nginx  
  </code></pre>
  
  <p>My <code>phpinfo</code> remains the same but it I can now see <code>imap.ini</code> in <code>mods-available/</code>.</p>
  
  <pre><code># ls /etc/php5/mods-available/
  curl.ini  gd.ini  imap.ini  json.ini  mcrypt.ini  mysqli.ini  mysql.ini  opcache.ini  pdo.ini  pdo_mysql.ini  readline.ini  ssh2.ini
  </code></pre>