How to view stderr of PHP's ldap_* functions (with LDAP_OPT_DEBUG_LEVEL=7) from mod_php

前端 未结 1 1916
刺人心
刺人心 2021-01-22 11:20

I can run the following from the PHP 5.4.16 CLI:

ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
$conn = ldap_connect($hostname);
ldap_bind($conn, $ldaprdn);


        
相关标签:
1条回答
  • 2021-01-22 11:38

    The answer is that those messages are being logged, but to a different log file than where the error_log() messages go. In my Apache conf, each virtual host has its own error log file. There is also a global error log file where Apache startup/shutdown messages show up.

    I was running these LDAP debug scripts on a virtual host and expecting the error output to go to the host's defined error log... just like all other error messages do. But for some reason those ldap debug lines get sent to the global error log.

    0 讨论(0)
提交回复
热议问题