File: faq.html

package info (click to toggle)
libapache-mod-cgi-debug 0.7-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 88 kB
  • ctags: 40
  • sloc: ansic: 350; sh: 87; makefile: 63
file content (162 lines) | stat: -rw-r--r-- 5,907 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<HTML>
<HEAD>
   <TITLE>Now whom do we write to congress about?</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#00FFFF" VLINK="#FF00FF" ALINK="#FF0000">

<H1>FAQ.</H1>
<BR>		<A HREF="#_1_1">So what is Mod CGI Debug?</A></BR>
<BR>		<A HREF="#_1_2">Where do I get it from?</A></BR>
<BR>		<A HREF="#_1_3">What sort of license does it have?</A></BR>
<BR>		<A HREF="#_1_4">How can I make suggestions for it?</A></BR>
<BR>		<A HREF="#_1_5">How can I report a bug?</A></BR>
<BR>		<A HREF="#_1_6">Is there a mailing list?</A></BR>
<BR>		<A HREF="#_1_7">How do I install it?</A></BR>
<BR>		<A HREF="#_1_8">How do I use it?</A></BR>
<BR>		<A HREF="#_1_9">What are the directives?</A></BR>
<BR>		<A HREF="#_1_10">How do I customize it?</A></BR>
<BR>		<A HREF="#_1_11">What about running the CGI and getting output?</A></BR>

<BR><H3><A NAME="_1_1"></A>So what is Mod Debug?</H3>

<P>Mod Debug is designed to help with the CGI programming and debugging 
process.  While programming a CGI script, it is often rather difficult
to discover what is actually getting returned to the web server.  Rather
than chopping up your CGI script with a whole bunch of debug print 
statements, a single change to the action statement of the calling
form will bring up a nicely formatted page with all of the information
that the web server sees, including any get and post arguments, and 
the send and recieve headers.</P>

<BR><H3><A NAME="_1_2"></A>Where do I get it from?</H3>

<P>You can get it from either <A HREF="http://www.tangent.org/mod_cgi_debug/download.html">here</A> via the web or <A HREF="ftp://www.tangent.org/pub/apache/">here</A> via ftp.

<BR><H3><A NAME="_1_3"></A>What sort of license does it have?</H3>

<P>You are pretty much free to use it as you please. Check
out the License file with the distribution for more details. In
all likelihood I will switch to either GNU or Apache style
licensing at some point in the future.</P>

<BR><H3><A NAME="_1_4"></A>How can I make suggestions for it?</H3>

<P>Send email to <A HREF="mailto:cgidebug@tangent.org.">cgidebug@tangent.org.</A></P>

<BR><H3><A NAME="_1_5"></A>How can I report a bug?</H3>

<P>Send email to <A HREF="mailto:cgidebug@tangent.org.">cgidebug@tangent.org</A>. </P>

<BR><H3><A NAME="_1_6"></A>Is there a mailing list?</H3>

<P>Not yet.  If you have any bug reports or requests for features, please send email to us at <A HREF="mailto:cgidebug@tangent.org">cgidebug@tangent.org</A> </P>.

<BR><H3><A NAME="_1_7"></A>How do I install it?</H3>

<P>From the INSTALL file:</P>

<BR>
<P>Do you use DSO? If so just type make and</P>

<P>as long as apxs is in your path all things</P>

<P>should go smoothly.</P>

<P>If you are not using DSO you should be :)</P>

<BR>
<P>If for some reason you need to compile
apache try the following:</P>

<P>1. Change the current directory to the directory containing your
apache source distribution.</P>

<BR>
<P>2. Call the configure script as you normally would and add the
switch:</P>

<P>--add-module=&lt;path-to-mod_cgi_debug-directory&gt;/mod_cgi_debug.c</P>

<BR>
<P>3. Make sure the build environment is clean by issuing the
following</P>

<P>   command:</P>

<P>&gt; make clean</P>

<BR>
<P>4. Build the new httpd binary with:</P>

<P>&gt; make</P>

<BR>
<P>5. Install the new httpd binary with:</P>

<P>&gt; make install</P>

<BR><H3><A NAME="_1_8"></A>How do I use it?</H3>

<P>Once you have mod_cgi_debug set up and going, it's time to modify the
httpd.conf file to use it. Add a line that says:
<PRE>
AddHandler cgi_debug .env
</PRE>
Restart Apache, and any URL directed to the server with a .env extension will get 
passed to mod_cgi_debug.</P>

<P>Now is the fun part- take any HTML form (or CGI that generates a form), and tack
a '.env' on the end of the name of the CGI that is processing the form.  Pull up a
web browser, fill in the form, press 'submit', and see what the server sees!

<BR><H3><A NAME="_1_9"></A>What are the directives?</H3>

<LI>CGIDebugKeyColor</LI>

<LI>CGIDebugValueColor</LI>

<LI>CGIDebugHeaderIn</LI>

<LI>CGIDebugHeaderOut</LI>

<LI>CGIDebugGetData</LI>

<LI>CGIDebugPostData</LI>

<LI>CGIDebugPathInfo</LI>

<LI>CGIDebugHangingIndent</LI>

<LI>CGIDebugHandler</LI>

<LI>CGIDebugHandlerKey</LI>

<BR>

<BR><H3><A NAME="_1_10"></A>How do I customize it?</H3>

<P>All of the directives above customize the appearance of the cgi_debug page, and
change what information is displayed.  The CGIDebugKeyColor and CGIDebugValueColor 
directives both take a string containing a color in hexidecimal format. (i.e. "#FFFFFF").
The others are simply On or Off.

<BR><H3><A NAME="_1_11"></A>What about running the CGI and getting output?</H3>
<P> Yes!. Not a problem, but none of the content from a POST based request
will be displayed (ok, this is not entirely true... anything that was
an argument to the URI will be displayed but until Apache 2.1 comes out
there is nothing we can do about data sent to STDIN. To dink with that
would require us to do something like mod_ssl which would mean compiling
into Apache... that would be a mess). For it to work you need to
tell mod_cgi to handle the content type. For this to work you would
need use "CGIDebugHandler cgi-script" or for mod_perl "CGIDebugHandler perl-script". For PHP you would need to use its handler types. To enable different sections to be display add to your URI arguments "_DEBUG=headsersin". The different values that are supported currently are: 
<LI>banner (prints out host information and such)
<LI>headersin (prints out the HTTP headers that arrived from the browser)
<LI>headersout (prints out the HTTP headers that we are sending out (only partially supported)
<LI>unparsed_uri (what the URI looked like on the way in)
<LI>path_info
<LI>get_args (arguments on the URI)

<BR> Note that the key used in arguments, "_DEBUG", can be changed by using the CGIDebugHandlerKey directive.

</BODY>
</HTML>