在linux(unix)下编译PHP时设置#./configure --with-ldap
#make

解决方案 »

  1.   

    二楼正解,winxp下我也不知道,因为我从不在windows下运行php
      

  2.   

    需求
    You will need to get and compile LDAP client libraries from either the University of Michigan ldap-3.3 package, Netscape Directory SDK 3.0 or OpenLDAP to compile PHP with LDAP support. 安装
    LDAP support in PHP is not enabled by default. You will need to use the --with-ldap[=DIR] configuration option when compiling PHP to enable LDAP support. DIR is the LDAP base install directory. Note to Win32 Users: In order to enable this module on a Windows environment, you must copy several files from the DLL folder of the PHP/Win32 binary package to the SYSTEM folder of your windows machine. (Ex: C:\WINNT\SYSTEM32, or C:\WINDOWS\SYSTEM). For PHP <= 4.2.0 copy libsasl.dll, for PHP >= 4.3.0 copy libeay32.dll and ssleay32.dll to your SYSTEM folder. 我认为在编译PHP时设置,可以在winxp下用ldap的,--with-ldap是在php.ini里加吗??
      

  3.   

    我只是想知道--with-ldap是不是在php.ini里设置???没有人知道么??
      

  4.   

    我知道了只要将php.ini中;extension=喊有ldap的部分的;去掉就可以了,
    但我在extension目录中没有php_ldap.dll 这个文件不知道哪位高手指点一下那里有下??
      

  5.   

    php.ini中不能加这个的.
    php_ldap.dll 在 pecl 包内.http://cn.php.net/get/pecl-5.0.4-Win32.zip/from/a/mirror
      

  6.   

    php.ini中不能加这个的.楼上,我不懂!我从网上下了4.3.10for win32的php文件,解压后在
    php-4.3.10-Win32\extensions找到了php_ldap.dll!!!再根据php手册中Note to Win32 Users: In order to enable this module on a Windows environment, you must copy several files from the DLL folder of the PHP/Win32 binary package to the SYSTEM folder of your windows machine. (Ex: C:\WINNT\SYSTEM32, or C:\WINDOWS\SYSTEM). For PHP <= 4.2.0 copy libsasl.dll, for PHP >= 4.3.0 copy libeay32.dll and ssleay32.dll to your SYSTEM folder. 将libeay32.dll and ssleay32.dll 拷贝至c:\windows\system32目录(我用的是winxp)重起apache 没有错误了!可是我还是不懂,我装了openldap后,我还要装什么在系统里啊?是不是还要有一个数据库来存放ldap的数据啊??
      

  7.   

    我现在搞定了后,在写php网页时,每次运行test.php后,无法bind(绑定)ldap!!Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in d:\greenamp\www\cmailnet\test.php on line 7在php里报错!这是为什么啊!!!!