GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  APACHE::DB (3)

.ds Aq ’

NAME

Apache::DB - Run the interactive Perl debugger under mod_perl

CONTENTS

SYNOPSIS



 <Location /perl>
  PerlFixupHandler +Apache::DB

  SetHandler perl-script
  PerlHandler +Apache::Registry
  Options +ExecCGI
 </Location>



DESCRIPTION

Perl ships with a very useful interactive debugger, however, it does not run out-of-the-box in the Apache/mod_perl environment. Apache::DB makes a few adjustments so the two will cooperate.

FUNCTIONS

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:



 #where db.pl is simply:
 # use Apache::DB ();
 # Apache::DB->init;
 PerlRequire conf/db.pl

 #where modules are loaded
 PerlRequire conf/init.pl



If you are using mod_perl 2.0 you will need to use the following as your db.pl:



  use APR::Pool ();
  use Apache::DB ();
  Apache::DB->init();



handler This function will start the interactive debugger. It will invoke Apache::DB::init if needed. Example configuration:



 <Location /my-handler>
  PerlFixupHandler Apache::DB
  SetHandler perl-script
  PerlHandler My::handler
 </Location>



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.

1) You need to edit/create the file local.te and add the following:

if (httpd_tty_comm) {
allow { httpd_t } admin_tty_type:chr_file { ioctl getattr }; }

2) Reload your security policy.

3) Run the command setsebool httpd_tty_comm true.

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.

CAVEATS

-X The server must be started with the -X to use Apache::DB.
filename/line info The filename of Apache::Registry scripts is not displayed.

SEE ALSO

perldebug(1)

AUTHOR

Originally written by Doug MacEachern

Currently maintained by Frank Wiles <frank@wiles.org>

LICENSE

This module is distributed under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DB (3) 2008-04-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.