I see messages like "Cannot modify header information" in my syslog, but I can't find these (ldap auth failed) messages anywhere.
My PHP is a little rusty, so I googled a bit, and found that the trigger_error function takes a "message" and a "severity" parameter, but I haven't found this "ERROR" constant(?) anywhere.
The error constants are in core/constants_inc.php. These are indexes into the language strings ("MANTIS_ERROR[]") that are printed with the error handler.
There was a bug in the error handler in 0.19.2 where the handler didn't stop on some errors. Adding
Unfortunately, that didn't work. I added those lines to config_inc.php, and restarted Apache to be sure.
Since I'm trying to setup LDAP authentication, I tried to login (which failed) and expected error messages to show up on the logs somewhere. But they didn't. I grepped for 'mantis' in /var/log/* and only found "Cannot modify header information" warnings...
Also, I understand about the error constants, but don't understand what is the second argument to trigger_error(...), "ERROR".
The second argument to trigger_error is the error type. "trigger_error" is a standard php function.
The "headers already sent" messages imply that text has already been sent before the headers are sent. There may be some other error that is being ignored.
I'd look into the config_defaults_inc.php file and copy the $g_display_error array to your config_inc.php file. Change all of the actions to 'halt' to stop progress after any error. Setting "$g_show_detailed_errors = ON;" will also provide a traceback where the error is coming from.
But all I get when I try to login is "Your account may be disabled or blocked or the username/password you entered is incorrect.". No backtraces, and no specific LDAP errors.
I understand that the second argument to trigger_error(...) is the error type. What I don't understand is: which error type is the "ERROR" identifier refer to? Is "ERROR" a constant defined somewhere?
The error messages from LDAP seem to be suppressed in core/ldap_api.php. You may want to instrument this code to debug it. Note that when you do this, you will probably see errors saying "headers already sent" based on the debug output.