The error happens even when DebugP or LogDebugP parameters are false.
This is because the call to rp_debug forces the debug_p parameter to
"t" i.e. rp_debug -debug t "error in rp_handler: $errmsg"
No, I don't think so. (Did you actually try it?) Because when the
DebugP or LogDebugP parameters are false at server startup time, the
rp_debug proc
literally does nothing - it is defined to
immediately return. From reading the code, what you are talking about
with "rp_debug -debug t" only applies when NaviServer was started up
with one of the DebugP or LogDebugP parameters set to true.
Btw, I don't personally like this style of conditionally defining
entirely different procedure definitions. But in this case, maybe it
was done for performance.