Php LDAP_OPT_DEBUG_LEVEL, 7 not tracing

霸气de小男生 提交于 2019-12-24 05:27:20

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/24522383/php-ldap-opt-debug-level-7-not-tracing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!