[PHPSwitcher] How to compile php 7 with php_ldap support?

  • [PHPSwitcher] How to compile php 7 with php_ldap support?


    I am just trying to compile PHP 7 with the PHP LDAP extension "php_ldap". Can someone help me, or give a tip how I can activate this, maybe even later?


    Thank you so much!

  • @mUTE


    ldap is compiled as shared module already. You must just activate it. In order you must:

    • Compile PHP 7.0 as usually using the PHP compiler provided with the PhpSwitcher plugin
    • You must enable the ldap module by editing the /opt/phpswitcher/php7.0/etc/php/conf.d/modules.ini file:
    PHP
    1. ;extension = ldap.so

    must become

    PHP
    1. extension = ldap.so

    Once done, you must restart either the Apache2 server or the PHP-FPM instance:

    • If you use the FPM SAPI (i-MSCP apache PHP-FPM server implementation): service psw7.0-fpm restart
    • If you use the CGI SAPI (i-MSCP apache fcgid server implementation): service apache2 restart

    Then, ldap should be now available:


    Shell-Script
    1. root@jessie:/# /opt/phpswitcher/php7.0/sbin/psw7.0-fpm -m | grep ldap
    2. ldap
    3. root@jessie:/#


    BTW: I would recommend you to read the documentation, specially this part: https://wiki.i-mscp.net/doku.p…er#php_extensions_modules

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206