title: php how to enable an extension
body: <p>i already have xampp installed. 
  the version of xampp is:</p>
  
  <blockquote>
    <p>XAMPP 5.6.12-0</p>
  </blockquote>
  
  <p>I am working on:</p>
  
  <blockquote>
    <p>OS X El Capitan, Version 10.11.1</p>
  </blockquote>
  
  <p>I have <code>php.ini</code> in this path:</p>
  
  <blockquote>
    <p>/Applications/XAMPP/xamppfiles/etc/php.ini</p>
  </blockquote>
  
  <p>inside it, there is line: </p>
  
  <pre><code>extension=php_imap.dll
  </code></pre>
  
  <p>However, that <code>IMAP</code> extension is not loaded, I knew that because I run this command on the terminal:</p>
  
  <pre><code>php -r "print_r(get_loaded_extensions());"
  </code></pre>
  
  <p>and this is the result I get:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Core
      [1] =&gt; date
      [2] =&gt; ereg
      [3] =&gt; libxml
      [4] =&gt; openssl
      [5] =&gt; pcre
      [6] =&gt; sqlite3
      [7] =&gt; zlib
      [8] =&gt; bcmath
      [9] =&gt; bz2
      [10] =&gt; calendar
      [11] =&gt; ctype
      [12] =&gt; curl
      [13] =&gt; dba
      [14] =&gt; dom
      [15] =&gt; hash
      [16] =&gt; fileinfo
      [17] =&gt; filter
      [18] =&gt; ftp
      [19] =&gt; gd
      [20] =&gt; SPL
      [21] =&gt; iconv
      [22] =&gt; json
      [23] =&gt; ldap
      [24] =&gt; mbstring
      [25] =&gt; session
      [26] =&gt; standard
      [27] =&gt; mysqlnd
      [28] =&gt; mysqli
      [29] =&gt; PDO
      [30] =&gt; pdo_mysql
      [31] =&gt; pdo_sqlite
      [32] =&gt; Phar
      [33] =&gt; posix
      [34] =&gt; readline
      [35] =&gt; Reflection
      [36] =&gt; mysql
      [37] =&gt; shmop
      [38] =&gt; SimpleXML
      [39] =&gt; snmp
      [40] =&gt; soap
      [41] =&gt; sockets
      [42] =&gt; exif
      [43] =&gt; sysvmsg
      [44] =&gt; sysvsem
      [45] =&gt; sysvshm
      [46] =&gt; tidy
      [47] =&gt; tokenizer
      [48] =&gt; wddx
      [49] =&gt; xml
      [50] =&gt; xmlreader
      [51] =&gt; xmlrpc
      [52] =&gt; xmlwriter
      [53] =&gt; xsl
      [54] =&gt; zip
  )
  </code></pre>
  
  <h3> my question </h3>
  
  <p>How to install/enable the <strong>IMAP</strong> extension </p>
  
  <p>I searched online, and I found <a href="https://stackoverflow.com/questions/16277255/why-is-imap-not-working-in-php">this question</a> , they said to add the <code>extension=php_imap.dll</code> to my <code>php.ini</code>. However, it is already there. </p>
  
  <p>I continue searching, and I found <a href="https://serverfault.com/questions/173443/how-do-i-enable-the-imap-functions-in-php">this question</a>, they said to do <code>apt-get install php5-imap</code>. However, I got the following error on the terminal</p>
  
  <pre><code>apt-get: command not found
  </code></pre>
  
  <p>Do you know how can I enable/install the IMAP extension?</p>
  
  <p>Thanks</p>