PHP LDAP_OPT_DEBUG_LEVEL,未跟踪7 [英] Php LDAP_OPT_DEBUG_LEVEL, 7 not tracing

查看:69
本文介绍了PHP LDAP_OPT_DEBUG_LEVEL,未跟踪7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取ldap_bind来找出其作用.我有以下

I'm trying to get ldap_bind to trace out what its doing. I have the following

ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
putenv('LDAPTLS_REQCERT=never');
error_reporting(E_ALL);
ini_set('display_errors', 1);

$ds = ldap_connect($server);
$r = ldap_bind($ds, $admin, $passwd);

我删除了一些设置变量的代码.但是,我想查看跟踪语句以帮助解决另一个问题.

I removed some code setting up variables. However I want to see the trace statements to help trouble shoot another issue.

推荐答案

设置选项ldap_set_option后,需要使用ldap_error($ds)打印错误.以下链接 http://ourlife01.blogspot.co. uk/2012/05/debugging-ldap-php-scripts.html 举了一个例子.

You need to print out the errors using ldap_error($ds) after setting the option ldap_set_option. The following link http://ourlife01.blogspot.co.uk/2012/05/debugging-ldap-php-scripts.html has an example.

这篇关于PHP LDAP_OPT_DEBUG_LEVEL,未跟踪7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆