httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Davis <>
Subject Re: [users@httpd] Newbe needs help passing form data
Date Thu, 29 Dec 2005 17:37:02 GMT

On 12/29/05 12:22 PM, "Arnie & Georgia Stender" <>

> Hello,
>     I am setting up my own Internet presence starting with DNS and HTML
> servers. I am teaching myself (as much as possible) how to write HTML
> from scratch. Below you will find the server $ENV variables which will
> describe versions of the server etc. This is running on Linux (LFS) 6.0
> server.  I have looked through at least the archives for this month and
> not found an answer to my problem as well as a number of books on the
> subject of writing CGI (perl). So I ask you:
> I have written a small HTML with a three field form that is supposed to
> pass the data to a perl script which in turn writes a dynamic HTML page
> based on the input to the form and sends it back to the browser.
> According to all I have read if I use method==POST the form data is
> supposed to be sent to the script via STDIN and if I use method==GET the
> data is sent via the $ENV{QUERY_STRING} variable. When using POST the
> amount of data being sent is available in the $ENV{CONTENT_LENGTH}
> variable. I have enabled everything I can find to run CGI on the server
> but I can not get the server to send any information to the script. I
> created the perl script from the online Apache manual to dump all the
> variables it is passing and the QUERY_STRING is empty and if the form is
> using POST the CONTENT_LENGTH==0. I am about 90% certain that I am
> missing something in the configuration file but after days of looking
> and reading I have not found out what it is. Running 'perl -w script'
> with a QUERY_STRING environment variable set equal to good data produces
> a good looking HTML output so I will go out on a limb and say the
> problem is not in the perl script. So, can anybody tell me what I am
> missing? BTW, the CGI script does produce the static portion of the HTML
> so the script is running just not getting the form data. Thanks in
> advance for any help you can give to point me in the right direction.
> Below is a sanitized output from the Apache ENV dump script.

You needn't parse environment variables and the like.  Use  Here are
the docs and there are MANY sources of examples and online tutorials.

There is an example script in the Synopsis that you should be able to use as
a test.  Google is very useful as is perlmonks (


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message