title: Unable to enable PHP LDAP even though I have edited php.ini and php_ldap.dll is in the right place?
body: <p>I've been working with a WAMP install for quite a while now with LDAP enabled and everything is going smoothly. Now though I have to set up another machine and for some reason I can't enable LDAP.</p>
  
  <p>I checked the output of <code>phpinfo()</code> and the LDAP section isn't there. I edited <code>php.ini</code> to uncomment the line:</p>
  
  <pre><code>extension = php_ldap.dll
  </code></pre>
  
  <p>I also checked the filepath being searched for extensions and the file <code>php_ldap.dll</code> is in the right place.</p>
  
  <p>I'm <em>positive</em> I'm editing the right <code>php.ini</code> file since I checked the filepath being shown by <code>phpinfo()</code>, and also I am able to successfully enable/disable other extensions.</p>
  
  <p>I have rebooted Apache after every change made.</p>
  
  <p>While Googling this, the only solutions I found were those above, plus one or two mentions of editing the Windows <code>PATH</code> variable to include the path to <code>php.ini</code>? Tried it even though it didn't make sense to me (as I already know <code>php.ini</code> is being parsed). I also checked my previous install on the other machine and from what I can see I never added any PHP directories to the <code>PATH</code> on that machine</p>
  
  <h3>Edit with complete answer</h3>
  
  <p>Frank's answer below led me to the solution so I thought I'd consolidate everything now.</p>
  
  <p>To Enable LDAP Support on a WAMP server:</p>
  
  <ol>
  <li>Uncomment <code>extension = php_ldap.dll</code> in <code>php.ini</code></li>
  <li><strong>IMPORTANT</strong>: Make sure that you're editing the right <code>php.ini</code> by checking the output of <code>phpinfo()</code></li>
  <li>Check the <code>php.ini</code> file for the location of your extensions directory</li>
  <li>Check that <code>php_ldap.dll</code> is located in that directory</li>
  <li>(<strong>THE STEP I MISSED</strong>) Find the files <code>libeay32.dll</code> and <code>ssleay32.dll</code> and add their directory to the Windows PATH</li>
  <li>Reboot Apache. If LDAP is enabled there will be a section about it in the output of <code>phpinfo()</code></li>
  </ol>