Re: [users@httpd] Newbe needs help passing form data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

> 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 CGI.pm.  Here are
the docs and there are MANY sources of examples and online tutorials.

http://search.cpan.org/~lds/CGI.pm-3.15/CGI.pm

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 (http://perlmonks.org).

Sean




---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux