You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian Dessent <br...@dessent.net> on 2003/10/01 02:14:36 UTC

Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

David Christensen wrote:

> And here is one that Mozilla attempts to download, while IE says "The
> page cannot be found":
> 
>     dpchrist@d3020g:~/public_html/cgi-bin:CVS> cat intro3.pl
>     #!/usr/bin/perl -w
>     use strict;
> 
>     print "Content-Type: text/html\n\n";
> 
>     print <<END;
>     <html>
>     <head><title>My Page Title</title></head>
>     <body><p>My page body</p></body>
>     </html>
>     END
>     exit(0);

You need to use \r\n for line endings in the HTTP headers, not \n.

This is exactly the sort of reason why you should always use CGI.pm and
not try to handle HTTP headers, forms, encoding, etc. with code that
your write.  It's almost guaranteed that there is always some minor
thing that will break "home brewed" scripts that is handled properly by
CGI.pm.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by David Christensen <dp...@holgerdanske.com>.
users@httpd.apache.org:

Brian Dessent wrote:
> What are the permissions and user/group of all these script files?
> Try making them all 755 and see if that changes anything.

    dpchrist@d3020g:~/public_html/cgi-bin$ ll
    total 52
    drwxr-xr-x    3 dpchrist dpchrist     4096 Oct  1 12:13 ./
    drwxr-xr-x    4 dpchrist dpchrist     4096 Sep 28 21:41 ../
    drwxr-xr-x    2 dpchrist dpchrist     4096 Sep 30 21:07 CVS/
    -rwxr-xr-x    1 dpchrist dpchrist      186 Sep 29 22:42 bar.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      351 Oct  1 12:12 dumpvars.pl*
    -rwxr-xr-x    1 dpchrist dpchrist       81 Sep 29 17:46 foo.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      194 Sep 30 20:51 intro3.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      215 Nov 20  2000 intro3a.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      219 Sep 30 20:46 intro3b.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      194 Sep 30 20:51 intro3d.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      193 Sep 29 22:42 intro4.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      166 Sep 29 22:42 intro5.pl*
    -rwxr-xr-x    1 dpchrist dpchrist      747 Sep 29 22:42 intro7.pl*


> And what user is Apache running as,


    dpchrist@d3020g:~/public_html/cgi-bin$ cat dumpvars.pl
    #! /usr/bin/perl
    use warnings;
    use strict;
    use CGI qw( :standard );
    print header('text/plain');
    print "Environment variables:\n";
    foreach my $key ( sort keys %ENV ) {
        print "    ", $key, " => ", $ENV{$key}, "\n";
    }
    print "\n";
    print "Command output:\n";
    foreach my $cmd (sort qw( hostname pwd whoami )) {
        print "    ", $cmd, " => ", `$cmd`;
    }

    http://192.168.254.2/~dpchrist/cgi-bin/dumpvars.pl
    Environment variables:
        DOCUMENT_ROOT => /var/www
        GATEWAY_INTERFACE => CGI/1.1
        HTTP_ACCEPT => application/x-shockwave-flash,text/xml,applicatio
n/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng
,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
        HTTP_ACCEPT_CHARSET => ISO-8859-1,utf-8;q=0.7,*;q=0.7
        HTTP_ACCEPT_ENCODING => gzip,deflate
        HTTP_ACCEPT_LANGUAGE => en-us,en;q=0.5
        HTTP_CACHE_CONTROL => max-age=0
        HTTP_CONNECTION => keep-alive
        HTTP_HOST => 192.168.254.2
        HTTP_KEEP_ALIVE => 300
        HTTP_USER_AGENT => Mozilla/5.0 (Windows; U; Windows NT 5.0; en-U
S; rv:1.4) Gecko/20030624
        PATH => /usr/local/bin:/usr/bin:/bin
        QUERY_STRING =>
        REMOTE_ADDR => 192.168.1.10
        REMOTE_PORT => 4985
        REQUEST_METHOD => GET
        REQUEST_URI => /~dpchrist/cgi-bin/dumpvars.pl
        SCRIPT_FILENAME =>
/home/dpchrist/public_html/cgi-bin/dumpvars.pl
        SCRIPT_NAME => /~dpchrist/cgi-bin/dumpvars.pl
        SERVER_ADDR => 192.168.254.2
        SERVER_ADMIN => webmaster@d3020g
        SERVER_NAME => 192.168.254.2
        SERVER_PORT => 80
        SERVER_PROTOCOL => HTTP/1.1
        SERVER_SOFTWARE => Apache/1.3.26 (Unix) Debian GNU/Linux
        UNIQUE_ID => P3sniMCo-gIAAAD5AAQ

    Command output:
        hostname => d3020g
        pwd => /home/dpchrist/mysql-perl/public_html/cgi-bin
        whoami => dpchrist


> and is suexec in use?

How do I determine if suexec is in use?


David


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by Brian Dessent <br...@dessent.net>.
David Christensen wrote:

> The problem is the name "intro3.pl".  (And also "intro7.pl", and
> probably others that will only occur during a customer demonstration ;-)

What are the permissions and user/group of all these script files?  Try
making them all 755 and see if that changes anything.  And what user is
Apache running as, and is suexec in use?

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by David Christensen <dp...@holgerdanske.com>.
users@httpd.apache.org:

Jonas Eckerman wrote:
> I'd still suggest that you use wget or some other non-caching utility

wget 1.8.2 gets the script output when Mozilla 1.4 tries to download the
source:

    dpchrist@w2k30g:~$ wget -v http://192.168.254.2/~dpchrist/cgi-bin/in
tro3.pl
    --10:33:23--  http://192.168.254.2/%7Edpchrist/cgi-bin/intro3.pl
               => `intro3.pl'
    Connecting to 192.168.254.2:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]

        [ <=>                                 ] 290          283.20K/s

    10:33:23 (283.20 KB/s) - `intro3.pl' saved [290]

    dpchrist@w2k30g:~$ cat intro3.pl
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html
            PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
            "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title
>My Page Title</title>
    </head><body><p>Hello, World!</p></body></html>


Changing Mozilla's cache size to 0 MB, clearing the cache, and setting
"Compare the page in the cache to the page on the network" to "Every
time I view the page" fixes the problem!


Hip, Hip, Hazzah!  And many thanks for Jonas!  :-)


David


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-binbehaviordepends on script name and browser (?)

Posted by Webmaster <ea...@chatministries.org>.
roflll

At 19:29 02-10-03 -0700, you wrote:
>Webmaster wrote:
>> 
>> duh! /me hangs head in shame... sorry lol... thanks for pointing that out -
>> actually, you would think the "industry standard" would have used something
>> already in existence, wouldn't you? No? hehe
>
>I somehow picture some boardroom meeting at Redmond circa 1995: "Okay
>boys... Moving on, we have this issue of the forced refresh.  Netscape
>2.x does it with shift-F5, so obviously that's out.  How about Ctrl? 
>Yeah, that will work great!"
>
>Brian
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-binbehaviordepends on script name and browser (?)

Posted by Brian Dessent <br...@dessent.net>.
Webmaster wrote:
> 
> duh! /me hangs head in shame... sorry lol... thanks for pointing that out -
> actually, you would think the "industry standard" would have used something
> already in existence, wouldn't you? No? hehe

I somehow picture some boardroom meeting at Redmond circa 1995: "Okay
boys... Moving on, we have this issue of the forced refresh.  Netscape
2.x does it with shift-F5, so obviously that's out.  How about Ctrl? 
Yeah, that will work great!"

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behaviordepends on script name and browser (?)

Posted by Webmaster <ea...@chatministries.org>.
duh! /me hangs head in shame... sorry lol... thanks for pointing that out -
actually, you would think the "industry standard" would have used something
already in existence, wouldn't you? No? hehe

At 18:21 02-10-03 -0700, you wrote:
>Webmaster wrote:
>> 
>> Shift-refresh (ie) and shift-reload (ns) used to work well some years ago,
>> but in ie it no longer seems 100% I've noticed
>
>That's because it's not shift-F5 in IE, it's Ctrl-F5.
>
>Brian
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behaviordepends on script name and browser (?)

Posted by Brian Dessent <br...@dessent.net>.
Webmaster wrote:
> 
> Shift-refresh (ie) and shift-reload (ns) used to work well some years ago,
> but in ie it no longer seems 100% I've noticed

That's because it's not shift-F5 in IE, it's Ctrl-F5.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by Webmaster <ea...@chatministries.org>.
Shift-refresh (ie) and shift-reload (ns) used to work well some years ago,
but in ie it no longer seems 100% I've noticed
Richard A

At 17:24 02-10-03 -0700, you wrote:
>Jonas Eckerman wrote:
>
>> That said, I'd still suggest that you use wget or some other non-caching
utility for testing. Forgetting the browers cache is a common problem when
troubleshooting web server issues. When using any caching browser, make
sure you force it to reload the page every time, otherwise it will just
show you the cached resut and you'll see the problematic page even if it's
actually fixed in the server.
>
>That's a good point.  As a reminder to everyone, you can use Ctrl-F5 in
>Internet Explorer or Shift-F5 in Mozilla/Netscape to force a reload that
>will not use the cached copy of the page.  Regular F5 or hitting the
>Refresh icon will sometimes give you the old page.
>
>Brian
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by Brian Dessent <br...@dessent.net>.
Jonas Eckerman wrote:

> That said, I'd still suggest that you use wget or some other non-caching utility for testing. Forgetting the browers cache is a common problem when troubleshooting web server issues. When using any caching browser, make sure you force it to reload the page every time, otherwise it will just show you the cached resut and you'll see the problematic page even if it's actually fixed in the server.

That's a good point.  As a reminder to everyone, you can use Ctrl-F5 in
Internet Explorer or Shift-F5 in Mozilla/Netscape to force a reload that
will not use the cached copy of the page.  Regular F5 or hitting the
Refresh icon will sometimes give you the old page.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by Jonas Eckerman <jo...@frukt.org>.
On Tue, 30 Sep 2003 21:31:15 -0700, David Christensen wrote:

> code using only print(), but the issue at hand is that Mozilla
> and/or Apache are trying to download a CGI script named "intro3.pl"
> rather than doing what they're supposed to do (Apache executing the
> script and Mozilla displaying the output).

It'd not Mozilla that's doing something wrong. Mozilla simply sends a GET request and downloads what Apache sends. It's completely up to Apache todecide wether to send the file or execute it.

That said, I'd still suggest that you use wget or some other non-caching utility for testing. Forgetting the browers cache is a common problem when troubleshooting web server issues. When using any caching browser, make sure you force it to reload the page every time, otherwise it will just show you the cached resut and you'll see the problematic page even if it's actually fixed in the server.

Regards
/Jonas

-- 
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by David Christensen <dp...@holgerdanske.com>.
users@httpd.apache.org:

Brian Dessent wrote:
> You need to use \r\n for line endings in the HTTP headers, not \n.

Thanks for the reply.  :-)


I already tried newline expansion -- no effect.  I get the same wrong
behavior whether I use my original version of the script:

    dpchrist@d3020g:~/public_html/cgi-bin$ cat intro3.pl
    #!/usr/bin/perl -w
    use strict;

    print "Content-Type: text/html\n\n";

    print <<END;
    <html>
    <head><title>My Page Title</title></head>
    <body><p>My page body</p></body>
    </html>
    END
    exit(0);

    dpchrist@d3020g:~/public_html/cgi-bin$ perl intro3.pl
    Content-Type: text/html

    <html>
    <head><title>My Page Title</title></head>
    <body><p>My page body</p></body>
    </html>

Or Paul DuBois' version of the script:

    dpchrist@d3020g:~/public_html/cgi-bin$ mv intro3a.pl intro3.pl
    mv: overwrite `intro3.pl'? y

    dpchrist@d3020g:~/public_html/cgi-bin$ cat intro3.pl
    #! /usr/bin/perl
    # intro3.pl - script to generate a Web page
    print "Content-Type: text/html\n\n";
    print <<END;
    <html>
    <head><title>My Page Title</title></head>
    <body><p>My page body</p></body>
    </html>
    END
    exit (0);

    dpchrist@d3020g:~/public_html/cgi-bin$ perl intro3.pl
    Content-Type: text/html

    <html>
    <head><title>My Page Title</title></head>
    <body><p>My page body</p></body>
    </html>

Or Paul DuBois' version with newline expansion:

    dpchrist@d3020g:~/public_html/cgi-bin$ cp intro3b.pl intro3.pl
    cp: overwrite `intro3.pl'? y

    dpchrist@d3020g:~/public_html/cgi-bin$ cat intro3.pl
    #! /usr/bin/perl
    # intro3.pl - script to generate a Web page
    print "Content-Type: text/html\r\n\r\n";
    print <<END;
    <html>
    <head><title>My Page Title</title></head>
    <body><p>My page body</p></body>
    </html>
    END
    exit (0);

    dpchrist@d3020g:~/public_html/cgi-bin$ perl intro3.pl
    Content-Type: text/html

    <html>
    <head><title>My Page Title</title></head>
    <body><p>My page body</p></body>
    </html>

Or even "Hello, world!" using CGI.pm:

    dpchrist@d3020g:~/public_html/cgi-bin$ cp intro3d.pl intro3.pl
    cp: overwrite `intro3.pl'? y

    dpchrist@d3020g:~/public_html/cgi-bin$ cat intro3.pl
    #!/usr/bin/perl -w
    use strict;

    use CGI;
    my $cgi = new CGI;

    print $cgi->header(),
        $cgi->start_html("My Page Title"),
        $cgi->p("Hello, World!"),
        $cgi->end_html(),
        "\n";

    exit(0);

    dpchrist@d3020g:~/public_html/cgi-bin$ perl intro3.pl
    Content-Type: text/html; charset=ISO-8859-1

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html
            PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
            "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title
>My Page Title</title>
    </head><body><p>Hello, World!</p></body></html>


As I stated before:

    >> The behavior seems to depend on the script name, not the content.


The problem is the name "intro3.pl".  (And also "intro7.pl", and
probably others that will only occur during a customer demonstration ;-)


> This is exactly the sort of reason why you should always use CGI.pm
> and not try to handle HTTP headers, forms, encoding, etc. with code
> that your write.  It's almost guaranteed that there is always some
> minor thing that will break "home brewed" scripts that is handled
> properly by CGI.pm.

I agree that CGI.pm is safer than trying to generate valid HTML code
using only print(), but the issue at hand is that Mozilla and/or Apache
are trying to download a CGI script named "intro3.pl" rather than doing
what they're supposed to do (Apache executing the script and Mozilla
displaying the output).


If a CGI script outputs rotten content, then Apache should complain,
Mozilla should complain, or the displayed content might be malformed.


I tried killing the server with apachectl and running Apache from the
console with -X and some other options, but I don't know what to look
for in the output (see below).


Any ideas for tracking down where the error is (Apache vs. Mozilla)?


TIA,


David
--
root@d3020g:~# apachectl stop
/usr/sbin/apachectl stop: httpd stopped

root@d3020g:~# apache -X
[Tue Sep 30 21:16:52 2003] [warn] module config_log_module is already
loaded, skipping
[Tue Sep 30 21:16:52 2003] [warn] module mime_module is already loaded,
skipping

[Tue Sep 30 21:16:52 2003] [alert] apache: Could not determine the
server's fully qualified domain name, using 192.168.254.2 for ServerName

root@d3020g:~# apache -X -S
[Tue Sep 30 21:17:53 2003] [warn] module config_log_module is already
loaded, skipping
[Tue Sep 30 21:17:53 2003] [warn] module mime_module is already loaded,
skipping

[Tue Sep 30 21:17:53 2003] [alert] apache: Could not determine the
server's fully qualified domain name, using 192.168.254.2 for ServerName
VirtualHost configuration:

root@d3020g:~# apache -X -L
<Directory (http_core.c)
        Container for directives affecting resources located in the
specified directories
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
</Directory> (http_core.c)
        Marks end of <Directory>
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
<Location (http_core.c)
        Container for directives affecting resources accessed through
the specified URL paths
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
</Location> (http_core.c)
        Marks end of <Location>
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
<VirtualHost (http_core.c)
        Container to map directives to a particular virtual host, takes
one or more host addresses
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
</VirtualHost> (http_core.c)
        Marks end of <VirtualHost>
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
<Files (http_core.c)
        Container for directives affecting files matching specified
patterns
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
</Files> (http_core.c)
        Marks end of <Files>
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
<Limit (http_core.c)
        Container for authentication directives when accessed using
specified HTTP methods
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
</Limit> (http_core.c)
        Marks end of <Limit>
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
<LimitExcept (http_core.c)
        Container for authentication directives to be applied when any
HTTP method other than those specified is used to access the resource
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
</LimitExcept> (http_core.c)
        Marks end of <LimitExcept>
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
<IfModule (http_core.c)
        Container for directives based on existance of specified modules
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
</IfModule> (http_core.c)
        Marks end of <IfModule>
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
<IfDefine (http_core.c)
        Container for directives based on existance of command line
defines
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
</IfDefine> (http_core.c)
        Marks end of <IfDefine>
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
<DirectoryMatch (http_core.c)
        Container for directives affecting resources located in the
specified directories
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
</DirectoryMatch> (http_core.c)
        Marks end of <DirectoryMatch>
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
<LocationMatch (http_core.c)
        Container for directives affecting resources accessed through
the specified URL paths
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
</LocationMatch> (http_core.c)
        Marks end of <LocationMatch>
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
<FilesMatch (http_core.c)
        Container for directives affecting files matching specified
patterns
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
</FilesMatch> (http_core.c)
        Marks end of <FilesMatch>
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
AuthType (http_core.c)
        An HTTP authorization type (e.g., "Basic")
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
and in .htaccess
        when AllowOverride includes AuthConfig
AuthName (http_core.c)
        The authentication realm (e.g. "Members Only")
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
and in .htaccess
        when AllowOverride includes AuthConfig
Require (http_core.c)
        Selects which authenticated users or groups may access a
protected space

        Allowed in *.conf only inside <Directory>, <Files> or <Location>
and in .htaccess
        when AllowOverride includes AuthConfig
Satisfy (http_core.c)
        access policy if both allow and require used ('all' or 'any')
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
and in .htaccess
        when AllowOverride includes AuthConfig
AddDefaultCharset (http_core.c)
        The name of the default charset to add to any Content-Type
without one or 'Off' to disable
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes FileInfo
AccessFileName (http_core.c)
        Name(s) of per-directory config files (default: .htaccess)
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
DocumentRoot (http_core.c)
        Root directory of the document tree
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ErrorDocument (http_core.c)
        Change responses for HTTP errors
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes FileInfo
AllowOverride (http_core.c)
        Controls what groups of directives can be configured by
per-directory config files
        Allowed in *.conf only inside <Directory>, <Files> or <Location>
Options (http_core.c)
        Set a number of attributes for a given directory
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes Options
DefaultType (http_core.c)
        the default MIME type for untypable files
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes FileInfo
ServerType (http_core.c)
        'inetd' or 'standalone'
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
Port (http_core.c)
        A TCP port number
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
HostnameLookups (http_core.c)
        "on" to enable, "off" to disable reverse DNS lookups, or
"double" to enable double-reverse DNS lookups
        Allowed in *.conf anywhere
User (http_core.c)
        Effective user id for this server
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
Group (http_core.c)
        Effective group id for this server
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ServerAdmin (http_core.c)
        The email address of the server administrator
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ServerName (http_core.c)
        The hostname of the server
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ServerSignature (http_core.c)
        En-/disable server signature (on|off|email)
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
ServerRoot (http_core.c)
        Common directory of server-related files (logs, confs, etc.)
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ErrorLog (http_core.c)
        The filename of the error log
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
PidFile (http_core.c)
        A file for logging the server process ID
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ScoreBoardFile (http_core.c)
        A file for Apache to maintain runtime process management
information
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
LockFile (http_core.c)
        The lockfile used when Apache needs to lock the accept() call
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
AccessConfig (http_core.c)
        The filename of the access config file
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ResourceConfig (http_core.c)
        The filename of the resource config file
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ServerAlias (http_core.c)
        A name or names alternately used to access the server
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ServerPath (http_core.c)
        The pathname the server can be reached at
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
Timeout (http_core.c)
        Timeout duration (sec)
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
KeepAliveTimeout (http_core.c)
        Keep-Alive timeout duration (sec)
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
MaxKeepAliveRequests (http_core.c)
        Maximum number of Keep-Alive requests per connection, or 0 for
infinite
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
KeepAlive (http_core.c)
        Whether persistent connections should be On or Off
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
IdentityCheck (http_core.c)
        Enable identd (RFC 1413) user lookups - SLOW
        Allowed in *.conf anywhere
ContentDigest (http_core.c)
        whether or not to send a Content-MD5 header with each request
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes Options
UseCanonicalName (http_core.c)
        How to work out the ServerName : Port when constructing URLs
        Allowed in *.conf anywhere
StartServers (http_core.c)
        Number of child processes launched at server startup
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
MinSpareServers (http_core.c)
        Minimum number of idle children, to handle request spikes
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
MaxSpareServers (http_core.c)
        Maximum number of idle children
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
MaxServers (http_core.c)
        Deprecated equivalent to MaxSpareServers
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ServersSafetyLimit (http_core.c)
        Deprecated equivalent to MaxClients
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
MaxClients (http_core.c)
        Maximum number of children alive at the same time
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
MaxRequestsPerChild (http_core.c)
        Maximum number of requests a particular child serves before
dying.
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
RLimitCPU (http_core.c)
        Soft/hard limits for max CPU usage in seconds
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
RLimitMEM (http_core.c)
        Soft/hard limits for max memory usage per process
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
RLimitNPROC (http_core.c)
        soft/hard limits for max number of processes per uid
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
BindAddress (http_core.c)
        '*', a numeric IP address, or the name of a host with a unique
IP address
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
Listen (http_core.c)
        A port number or a numeric IP address and a port number
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
SendBufferSize (http_core.c)
        Send buffer size in bytes
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
AddModule (http_core.c)
        The name of a module
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ClearModuleList (http_core.c)
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ThreadsPerChild (http_core.c)
        Number of threads a child creates
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ExcessRequestsPerChild (http_core.c)
        Maximum number of requests a particular child serves after it is
ready to die.
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
ListenBacklog (http_core.c)
        Maximum length of the queue of pending connections, as used by
listen(2)

        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
AcceptFilter (http_core.c)
        Switch AcceptFiltering on/off (default is on).This feature is
currently not compiled in; so this directive is ignored.
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
CoreDumpDirectory (http_core.c)
        The location of the directory Apache changes to before dumping
core
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
Include (http_core.c)
        Name of the config file to be included
        Allowed in *.conf anywhere
LogLevel (http_core.c)
        Level of verbosity in error logging
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
NameVirtualHost (http_core.c)
        A numeric IP address:port, or the name of a host
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
CGICommandArgs (http_core.c)
        Allow or Disallow CGI requests to pass args on the command line
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes Options
ServerTokens (http_core.c)
        Tokens displayed in the Server: header - Min[imal], OS,
Prod[uctOnly], Full
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
LimitRequestLine (http_core.c)
        Limit on maximum size of an HTTP request line
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
LimitRequestFieldsize (http_core.c)
        Limit on maximum size of an HTTP request header field
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
LimitRequestFields (http_core.c)
        Limit (0 = unlimited) on max number of header fields in a
request message
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
LimitRequestBody (http_core.c)
        Limit (in bytes) on maximum size of request message body
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride isn't None
ShmemUIDisUser (http_core.c)
        Enable the setting of SysV shared memory scoreboard uid/gid to
User/Group
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
AcceptMutex (http_core.c)
        Serialized Accept Mutex; the methods 'sysvsem' 'fcntl' are
compiled in
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
FileETag (http_core.c)
        Specify components used to construct a file's ETag
        Allowed in *.conf anywhere and in .htaccess
        when AllowOverride includes FileInfo
LoadModule (mod_so.c)
        a module name and the name of a shared object file to load it
from
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
LoadFile (mod_so.c)
        shared object file or library to load into the server at runtime
        Allowed in *.conf only outside <Directory>, <Files> or
<Location>
<Macro (mod_macro.c)
        Beginning of a macro definition section.
        Allowed in *.conf anywhere [no per-dir config] and in .htaccess
        when AllowOverride isn't None
</Macro> (mod_macro.c)
        End of a macro definition section.
        Allowed in *.conf anywhere [no per-dir config] and in .htaccess
        when AllowOverride isn't None
Use (mod_macro.c)
        Use of a macro.
        Allowed in *.conf anywhere [no per-dir config] and in .htaccess
        when AllowOverride isn't None
Error (mod_macro.c)
        Error in a configuration file.
        Allowed in *.conf anywhere [no per-dir config] and in .htaccess
        when AllowOverride isn't None
Warning (mod_macro.c)
        Warning in a configuration file.
        Allowed in *.conf anywhere [no per-dir config] and in .htaccess
        when AllowOverride isn't None


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)

Posted by Nathan Ollerenshaw <na...@valuecommerce.ne.jp>.
On Oct 1, 2003, at 9:14 AM, Brian Dessent wrote:

> This is exactly the sort of reason why you should always use CGI.pm and
> not try to handle HTTP headers, forms, encoding, etc. with code that
> your write.  It's almost guaranteed that there is always some minor
> thing that will break "home brewed" scripts that is handled properly by
> CGI.pm.

Or go one step even better, and use CGI::Application. Not only does it 
handle all the mess for you (by using CGI.pm) but it also provides a 
framework for your application that makes sense.

Mix it up with HTML::Template to do the HTML presentation, and 
Form::Validator (I think thats the module) and you have everything you 
need to make an application quickly and safely.

The great thing about CGI::Application, though, as everyone knows, is 
that if you decide you need it to run faster, you can with very little 
modification make it a mod_perl app.

Just my 2c. :)

Nathan.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org