.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DB 3pm" .TH DB 3pm "2022-11-29" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Apache::DB \- Run the interactive Perl debugger under mod_perl .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& \& PerlFixupHandler +Apache::DB \& \& SetHandler perl\-script \& PerlHandler +Apache::Registry \& Options +ExecCGI \& .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Perl ships with a very useful interactive debugger, however, it does not run \&\*(L"out-of-the-box\*(R" in the Apache/mod_perl environment. Apache::DB makes a few adjustments so the two will cooperate. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .IP "init" 4 .IX Item "init" This function initializes the Perl debugger hooks without actually starting the interactive debugger. In order to debug a certain piece of code, this function must be called before the code you wish debug is compiled. For example, if you want to insert debugging symbols into code that is compiled at server startup, but do not care to debug until request time, call this function from a PerlRequire'd file: .Sp .Vb 4 \& #where db.pl is simply: \& # use Apache::DB (); \& # Apache::DB\->init; \& PerlRequire conf/db.pl \& \& #where modules are loaded \& PerlRequire conf/init.pl .Ve .Sp If you are using mod_perl 2.0 you will need to use the following as your db.pl: .Sp .Vb 3 \& use APR::Pool (); \& use Apache::DB (); \& Apache::DB\->init(); .Ve .IP "handler" 4 .IX Item "handler" This function will start the interactive debugger. It will invoke \&\fIApache::DB::init\fR if needed. Example configuration: .Sp .Vb 5 \& \& PerlFixupHandler Apache::DB \& SetHandler perl\-script \& PerlHandler My::handler \& .Ve .SH "SELinux" .IX Header "SELinux" Security-enhanced Linux (SELinux) is a mandatory access control system many linux distrobutions are implementing. This new security scheme can assist you with protecting a server, but it doesn't come without its own set of issues. Debugging applications running on a box with SELinux on it takes a couple of extra steps and unfortunately the instructions that follow have only been tested on RedHat/Fedora. .PP 1) You need to edit/create the file \*(L"local.te\*(R" and add the following: .PP if (httpd_tty_comm) { allow { httpd_t } admin_tty_type:chr_file { ioctl getattr }; } .PP 2) Reload your security policy. .PP 3) Run the command \*(L"setsebool httpd_tty_comm true\*(R". .PP You should be aware as you debug applications on a system with SELinux your code may very well be correct, but the system policy is denying your actions. .SH "CAVEATS" .IX Header "CAVEATS" .IP "\-X" 4 .IX Item "-X" The server must be started with the \f(CW\*(C`\-X\*(C'\fR to use Apache::DB. .IP "filename/line info" 4 .IX Item "filename/line info" The filename of Apache::Registry scripts is not displayed. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperldebug\fR\|(1) .SH "AUTHOR" .IX Header "AUTHOR" Originally written by Doug MacEachern .PP Currently maintained by Dirk Lindner .SH "LICENSE" .IX Header "LICENSE" This module is distributed under the same terms as Perl itself.