![]() |
Practical mod_perl / HTML Book / | ![]() |
||
![]() |
||||
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
||||
|
|
||||
![]() |
![]() |
|||
![]() |
4.4.7. Debugging |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
||
![]() |
||||
If your configuration doesn't seem to do what it's supposed to do, you should debug it. First, build mod_perl with:
panic% perl Makefile.PL PERL_TRACE=1 [...]
Next, set the environment variable MOD_PERL_TRACE to s (as explained in Chapter 21). Now you should be able to see how the <Perl>section globals are converted into directive string values. For example, suppose you have the following Perl section:
<Perl>
$DocumentRoot = "/home/httpd/docs/mine";
</Perl>
If you start the server in single-server mode (e.g., under bash):
panic% MOD_PERL_TRACE=s httpd -X
you will see these lines among the printed trace:
... SVt_PV: $DocumentRoot = `/home/httpd/docs/mine' handle_command (DocumentRoot /home/httpd/docs/mine): OK ...
But what if you mistype the directory name and pass two values instead of a single value? When you start the server, you'll see the following error:
... SVt_PV: $DocumentRoot = `/home/httpd/docs/ mine' handle_command (DocumentRoot /home/httpd/docs/ mine): DocumentRoot takes one argument, Root directory of the document tree ...
and of course the error will be logged in the error_log file:
[Wed Dec 20 23:47:31 2000] [error] (2)No such file or directory: <Perl>: DocumentRoot takes one argument, Root directory of the document tree
 
Continue to:
mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice
![]() |
Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.