很多站长朋友们都不太清楚phpldap开启,今天小编就来给大家整理phpldap开启,希望对各位有所帮助,具体内容如下:
本文目录一览: 1、 关于PHP Ldap 账户管理的问题 2、 ./configure编译php时这个问题如何解决? 3、 php中,ldap验证的错误: 这个报错始终解决不了,可否相告~ 4、 我的php环境php_ldap扩展无法打开 5、 我在PHP +apache +mysql环境安装一个流程软件 ,提示我缺少LDAP 。如何解决! 6、 什么是 php LDAP模块 关于PHP Ldap 账户管理的问题根据你说的应该是用户的问题,当时我用PHP连接LDAP的时候就是因为用户的问题,会出错,但是我具体忘了出错的提示信息。后来改了用户之后就能bind上用户了,配置这块我先看看我以前的日志,如果是你配置的问题,我会及时QQ联系你的601你的ldap_connect()函数能够连接上我感觉应该不是环境的问题k先试试吧
./configure编译php时这个问题如何解决?PHP的安装虽然有时候很简单,可是如果应用一多,我们安装起来就很头痛了!出错最多的就是安装PHP扩展的时候了。其实不管是你是Apache类的应用还是Nginx类的,PHP的安装都不是很简单,虽然网上有很多configure参数,但是那不一定是适合你的,因为很多都直接关系着你的系统版本和内核。因此要自己亲自不断的调试,才能完全安装成功。
本文总结了一些常见的configure错误信息和解决这些错误的经验。
1、configure: error: No curses/termcap library found
网上有的说法是:–with-named-curses-libs=/usr/lib/libncursesw.so.5
其实是不对的,虽然能解决configure的错误,但是make的时候会提示错误,正确的做法应该是
centos: yum -y install ncurses-devel
debian: apt-get install libncurses5-dev
2、configure: error: xml2-config not found. Please check your libxml2 installation.
centos: yum -y install libxml2 libxml2-devel
debian: apt-get install libxml2-dev
3、configure: error: Cannot find OpenSSL’s
centos: yum -y install openssl-devel
4、configure: error: libjpeg.(a|so) not found
centos: yum -y install gd
centos: yum -y install gd-devel
debian: apt-get install libjpeg-dev
5、configure: error: libpng.(a|so) not found.
apt-get install libpng12-dev
6、configure: error: cannot find output from lex; giving up
yum -y install flex
7、configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
centos: yum -y install zlib-devel openssl-devel
debian: apt-get install zlib1g-dev
8、configure: error: libxpm.(a|so) not found.
centos: yum -y install libxpm-dev
debian: apt-get install libxpm-dev
9、configure: error: freetype.h not found.
centos: yum install freetype-devel
debian: apt-get install libfreetype6-dev
10、configure: error: …No recognized SSL/TLS toolkit detected
centos: yum -y install libssl-dev
debian: apt-get install libssl-dev
11、Configure: error: Please reinstall the BZip2 distribution
centos: yum install bzip2 bzip2-devel
debian: apt-get install bzip2-devel
12、Configure: error: Please reinstall the libcurl distribution – easy.h should be in /include/curl/
centos: yum install curl curl-devel (For Redhat Fedora)
# install libcurl4-gnutls-dev (For Ubuntu)
13、Configure: error: Unable to locate gmp.h
centos: yum install gmp-devel
14、Configure: error: Cannot find MySQL header files under /usr. Note that the MySQL client library is not bundled anymore!
yum install mysql-devel (For Redhat Fedora)
# apt-get install libmysql++-dev (For Ubuntu)
15、Configure: error: Please reinstall the ncurses distribution
Solutions :
centos: yum install ncurses ncurses-devel
16、Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
Solutions :
centos: yum install unixODBC-devel
17、Configure: error: Cannot find pspell
Solutions :
centos: yum install pspell-devel
18、configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Solutions :
yum install libmcrypt libmcrypt-devel (For Redhat Fedora)
# apt-get install libmcrypt-dev
19、Configure: error: snmp.h not found. Check your SNMP installation.
Solutions :
yum install net-snmp net-snmp-devel
20、开启LDAP服务还需要
yum -y install openldap-devel openldap-servers openldap-clients
21、configure: error: cannot find output from lex; giving up
centos: yum -y install flex
22、configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
centos: yum -y install zlib-devel openssl-devel
debian: apt-get install zlib1g-dev
php中,ldap验证的错误: 这个报错始终解决不了,可否相告~在 LDAP 的协议之中,很像硬盘目录结构或倒过来的树状结构。LDAP 的根就是全世界,第一级是属于国别 (countries) 性质的层级,之后可能会有公司 (organization) 的层级,接着是部门 (organizationalUnit),再来为个人。而就像文件,每个人都会有所谓的显名 (distinguished name, 简称 dn),dn 可能像酱子 cn=John Smith,ou=Accounts,o=My Company,c=US。
<?php
// 本例使用到 connect, bind, search, interpret search
// result, close connection 等等 LDAP 的功能。
echo "<h3>LDAP 搜寻测试</h3>";
echo "连接中 ...";
$ds=ldap_connect("localhost"); // 先连上有效的 LDAP 服务器
echo "连上 ".$ds."<p>";
if ($ds) {
echo "Binding ...";
$r=ldap_bind($ds); // 匿名的 bind,为只读属性
echo "Bind 返回 ".$r."<p>";
echo "Searching for (sn=S*) ..."; // 找寻 S 开头的姓氏
$sr=ldap_search($ds,"o=My Company, c=US", "sn=S*");
echo "Search 返回 ".$sr."<p>";
echo "S 开头的姓氏有 ".ldap_count_entries($ds,$sr)." 个<p>";
echo "取回姓氏资料 ...<p>";
$info = ldap_get_entries($ds, $sr);
echo "资料返回 ".$info["count"]." 笔:<p>";
for ($i=0; $i<$info["count"]; $i++) {
echo "dn 为: ". $info[$i]["dn"] ."<br>";
echo "cn 为: ". $info[$i]["cn"][0] ."<br>";
echo "email 为: ". $info[$i]["mail"][0] ."<p>";
}
echo "关闭链接";
ldap_close($ds);
} else {
echo "<h4>无法连接到 LDAP 服务器</h4>";
}
?>
我的php环境php_ldap扩展无法打开libsasl.dll 把这个文件复制到apache/bin里面或者system32里面然后重启 apache
我在PHP +apache +mysql环境安装一个流程软件 ,提示我缺少LDAP 。如何解决!首先 你在你本地的php新建一个php文件页面上写:<?php phpinfo(); ?> 会列出你的php配置列表,然后 你再去找里面有没有php_ldap的支持项,如果没有那么就是你php版本不支持ldap了,你自己发的截图上面的报错说的很清楚的了 我帮你翻译下,大概是这样的如果你想使用LDAP组件,你不得不安装必要的扩展,后面是系统没找到你与之关联扩展,就是说你安装php环境的时候,就缺少了LDAP这个组件 压根php.ini里面就没这项 你加了也没用,只能重新安装php环境 如果是linux服务器上面的比较麻烦了 要重新把LDAP的so文件编译安装下 这个网上有教程,如果是windows环境的那么我也无能为了 好像不支持LDAP,望楼主采纳
什么是 php LDAP模块ldap(lightweight
directory
access
protocol)的意思是"轻量级目录访问协议",是一个用于访问"目录服务器"(directory
servers)的协议。php要能够连接上ldap服务器,必须安装php-ldap模块,并修改php.ini配置,增加配置项extension=ldap.so,之后重启apache服务器。
关于phpldap开启的介绍到此就结束了,不知道本篇文章是否对您有帮助呢?如果你还想了解更多此类信息,记得收藏关注本站,我们会不定期更新哦。
查看更多关于phpldap开启 php ldap扩展的详细内容...