title: How to configure ext-ldap php
body: <p>I have installed openldap.
  I have tried in 2 ways.</p>
  <p><strong>Way 1</strong>- From the source ext</p>
  <pre><code>phpize
  ./configure --with-ldap=include --prefix=$prefix --build=aarch64-unknown-linux-gnu --with-php-config=$prefix/bin/php-config
  </code></pre>
  <p><strong>Resulting in gives error:</strong></p>
  <blockquote>
  <p>checking for ldap_refresh_s... no
  checking for ldap_bind_s... no
  configure: error: LDAP build check failed. Please check config.log</p>
  </blockquote>
  <p><strong>Way 2-</strong> Downloaded files from : <a href="https://pkgs.org/download/php-ldap" rel="nofollow noreferrer">pkgs aarch64</a>
  Manually cp corresponding files and tried to enable extension ldap from php.ini
  then <code>php -i | grep ldap</code> gives error:</p>
  <blockquote>
  <p>PHP Warning:  PHP Startup: Unable to load dynamic library 'ldap' (tried: /data/data/com.termux/files/usr/lib/php/ldap (dlopen failed: library &quot;/data/data/com.termux/files/usr/lib/php/ldap&quot; not found), /data/data/com.termux/files/usr/lib/php/ldap.so (dlopen failed: library &quot;libc.so.6&quot; not found)) in Unknown on line 0</p>
  </blockquote>
  <hr />
  <p>tried to <code>ln libc.so.6 from lib64/libc.so</code>
  no luck yet</p>