You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ian Hunter <ih...@hunterweb.net> on 2002/11/11 03:40:20 UTC
[users@httpd] GET works, POST returns no data
I'm running Apache 1.3.20 on SuSE Linux 2.2.20 on SPARC. I'm using the "out
of the box" config as closely as possible; the only changes I've made are to
set up virtual hosts. I'm using one of them for this test. The httpd.conf
section looks like this:
<VirtualHost *>
ServerName www.hunterweb.net
DocumentRoot /www/www
ErrorLog /var/log/httpd/www-error_log
CustomLog /var/log/httpd/www-access_log combined
ScriptAlias /cgi/ "/www/www/cgi/"
</VirtualHost>
OK -- If I set up a REALLY basic HTML form:
<html><body>
<form action="/cgi/param.pl" method="post">
Say something? <input type="text" name="whatever">
<br>
<input type="submit">
</form>
</body>
</html>
...and have a REALLY basic CGI script:
#!/usr/bin/perl
use CGI;
print "Content-type: text/html\n\n";
$query=new CGI;
$count=0;
for ($query->param) {
$count++;
print "#$count: $_ = " . $query->param($_) . "<br>\n";
}
print "<br>The script works.<br>\n";
-- As long as I do method="get" it works fine. I get a count of the
parameters (only "#1" with that silly form). If I change the "get" to a
"post" I get no output from the script EXCEPT for the last line which tells
me that at least the script is working; so I don't have any ScriptAlias or
permission problems.
I have sniffed the segment and the POST request *does* contain the data, and
I have found that STDIN doesn't return any data.
?!?!?!?!?!?
---------------------------------------------------------------------
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] GET works, POST returns no data
Posted by Justin Williams <ju...@naturalwebs.com>.
Sounds like your Perl script doesn't understand posted data, which is really
weird... Usually works the other way 'round, from what I understand...
Are that script's permissions set to execute?
----- Original Message -----
From: "Ian Hunter" <ih...@hunterweb.net>
To: <us...@httpd.apache.org>
Sent: Monday, November 11, 2002 11:21 AM
Subject: Re: [users@httpd] GET works, POST returns no data
> Did anyone see this post or did it get lost in the bowels of the internet?
> If no one has any ideas, where do I go next? Devel?
>
> ----- Original Message -----
> From: "Ian Hunter" <ih...@hunterweb.net>
> To: <us...@httpd.apache.org>
> Sent: Sunday, November 10, 2002 9:40 PM
> Subject: [users@httpd] GET works, POST returns no data
>
>
> > I'm running Apache 1.3.20 on SuSE Linux 2.2.20 on SPARC. I'm using the
> "out
> > of the box" config as closely as possible; the only changes I've made
are
> to
> > set up virtual hosts. I'm using one of them for this test. The
> httpd.conf
> > section looks like this:
> >
> > <VirtualHost *>
> > ServerName www.hunterweb.net
> > DocumentRoot /www/www
> > ErrorLog /var/log/httpd/www-error_log
> > CustomLog /var/log/httpd/www-access_log combined
> > ScriptAlias /cgi/ "/www/www/cgi/"
> > </VirtualHost>
> >
> >
> > OK -- If I set up a REALLY basic HTML form:
> >
> > <html><body>
> > <form action="/cgi/param.pl" method="post">
> > Say something? <input type="text" name="whatever">
> > <br>
> > <input type="submit">
> > </form>
> > </body>
> > </html>
> >
> > ...and have a REALLY basic CGI script:
> >
> > #!/usr/bin/perl
> >
> > use CGI;
> >
> > print "Content-type: text/html\n\n";
> >
> > $query=new CGI;
> > $count=0;
> > for ($query->param) {
> > $count++;
> > print "#$count: $_ = " . $query->param($_) . "<br>\n";
> > }
> > print "<br>The script works.<br>\n";
> >
> > -- As long as I do method="get" it works fine. I get a count of the
> > parameters (only "#1" with that silly form). If I change the "get" to a
> > "post" I get no output from the script EXCEPT for the last line which
> tells
> > me that at least the script is working; so I don't have any ScriptAlias
or
> > permission problems.
> >
> > I have sniffed the segment and the POST request *does* contain the data,
> and
> > I have found that STDIN doesn't return any data.
> >
> > ?!?!?!?!?!?
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
---------------------------------------------------------------------
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] GET works, POST returns no data
Posted by Ian Hunter <ih...@hunterweb.net>.
Did anyone see this post or did it get lost in the bowels of the internet?
If no one has any ideas, where do I go next? Devel?
----- Original Message -----
From: "Ian Hunter" <ih...@hunterweb.net>
To: <us...@httpd.apache.org>
Sent: Sunday, November 10, 2002 9:40 PM
Subject: [users@httpd] GET works, POST returns no data
> I'm running Apache 1.3.20 on SuSE Linux 2.2.20 on SPARC. I'm using the
"out
> of the box" config as closely as possible; the only changes I've made are
to
> set up virtual hosts. I'm using one of them for this test. The
httpd.conf
> section looks like this:
>
> <VirtualHost *>
> ServerName www.hunterweb.net
> DocumentRoot /www/www
> ErrorLog /var/log/httpd/www-error_log
> CustomLog /var/log/httpd/www-access_log combined
> ScriptAlias /cgi/ "/www/www/cgi/"
> </VirtualHost>
>
>
> OK -- If I set up a REALLY basic HTML form:
>
> <html><body>
> <form action="/cgi/param.pl" method="post">
> Say something? <input type="text" name="whatever">
> <br>
> <input type="submit">
> </form>
> </body>
> </html>
>
> ...and have a REALLY basic CGI script:
>
> #!/usr/bin/perl
>
> use CGI;
>
> print "Content-type: text/html\n\n";
>
> $query=new CGI;
> $count=0;
> for ($query->param) {
> $count++;
> print "#$count: $_ = " . $query->param($_) . "<br>\n";
> }
> print "<br>The script works.<br>\n";
>
> -- As long as I do method="get" it works fine. I get a count of the
> parameters (only "#1" with that silly form). If I change the "get" to a
> "post" I get no output from the script EXCEPT for the last line which
tells
> me that at least the script is working; so I don't have any ScriptAlias or
> permission problems.
>
> I have sniffed the segment and the POST request *does* contain the data,
and
> I have found that STDIN doesn't return any data.
>
> ?!?!?!?!?!?
>
>
> ---------------------------------------------------------------------
> 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