Newbie question - Adding "POST" to httpd.conf file?

Newbie question - Adding "POST" to httpd.conf file?

Post by BY2 » Fri, 18 Jan 2002 00:41:48



Hi,

I have root access to a server running Apache 1.3, which hosts our website.

But I would like to be able to run a couple of CGI files, that use the POST
method for sending forms.

I have two options:

1) Edit the CGI files to "GET" instead of "POST"

or

2) Configure the server to recognise and allow POST.

Having checked the Apache.org website, I'm no nearer to getting any ideas as
to which is best.

Any help/directions would be greatly appreciated,

TIA,

T.

 
 
 

Newbie question - Adding "POST" to httpd.conf file?

Post by Nemesis Service » Fri, 18 Jan 2002 01:39:07


POST should be allowed by default


Quote:> Hi,

> I have root access to a server running Apache 1.3, which hosts our
website.

> But I would like to be able to run a couple of CGI files, that use the
POST
> method for sending forms.

> I have two options:

> 1) Edit the CGI files to "GET" instead of "POST"

> or

> 2) Configure the server to recognise and allow POST.

> Having checked the Apache.org website, I'm no nearer to getting any ideas
as
> to which is best.

> Any help/directions would be greatly appreciated,

> TIA,

> T.


 
 
 

Newbie question - Adding "POST" to httpd.conf file?

Post by BY2 » Fri, 18 Jan 2002 01:57:26




> POST should be allowed by default




<snip>

Hi, and thanx for the reply,

Possibly it should be, but in this case it isn't. Any clues?

Ran a script to find the problem and this is what I got (if any help):

T.

SERVER_SOFTWARE --> Apache/1.3.20 Sun Cobalt (Unix) mod_ssl/2.8.4
OpenSSL/0.9.6b PHP/4.0.3pl1 mod_auth_pam_external/0.1 FrontPage/4.0.4.3
mod_perl/1.25
GATEWAY_INTERFACE --> CGI/1.1
DOCUMENT_ROOT --> [removed]
REMOTE_ADDR --> [removed]
REQUEST_METHOD --> GET
QUERY_STRING --> [removed]
HTTP_ACCEPT --> image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword,
*/*
REMOTE_PORT --> 34947
SERVER_ADDR --> [removed]
HTTP_ACCEPT_LANGUAGE --> en-gb
REDIRECT_UNIQUE_ID --> PEWLLNnHqioAAAR3Vio
SCRIPT_FILENAME --> /usr/cgiwrap/cgiwrap
HTTP_ACCEPT_ENCODING --> gzip, deflate
REDIRECT_STATUS --> 200
SERVER_NAME --> [removed]
SERVER_PORT --> 80
PATH_TRANSLATED --> [removed]
SERVER_ADMIN --> admin
UNIQUE_ID --> PEWLLNnHqioAAAR3Vio
REDIRECT_URL --> /cgi-bin/tryout.cgi
SCRIPT_URI --> [removed]
SCRIPT_URL --> /cgi-bin/tryout.cgi
SERVER_SIGNATURE -->
SERVER_PROTOCOL --> HTTP/1.1
HTTP_USER_AGENT --> Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
PATH --> /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
REDIRECT_SCRIPT_URI --> SCRIPT_NAME --> /cgi-bin/tryout.cgi
HTTP_CLIENT_IP --> [removed]
REDIRECT_SCRIPT_URL --> /cgi-bin/tryout.cgi
REQUEST_URI --> /cgi-bin/tryout.cgi
PATH_INFO --> /cgi-bin/tryout.cgi
HTTP_HOST --> HTTP_VIA --> HTTP/1.1 cache-ink-bas[3E1FE002]
(Traffic-Server/4.0.15-M [uSc ])

 
 
 

Newbie question - Adding "POST" to httpd.conf file?

Post by Ewgenij Starosti » Fri, 18 Jan 2002 02:04:21




|

| > POST should be allowed by default
| >
| >


|
| <snip>
|
| Hi, and thanx for the reply,
|
| Possibly it should be, but in this case it isn't. Any clues?
What exactly doesn't work if you simply specify method="post" in your HTML?
|
| Ran a script to find the problem and this is what I got (if any help):
(snip)
| REQUEST_METHOD --> GET
(snip)
This is just an info on what the current script uses. POST _should_ be still
enabled.

 
 
 

Newbie question - Adding "POST" to httpd.conf file?

Post by BY2 » Fri, 18 Jan 2002 02:18:55





> |


> | > POST should be allowed by default
> | >
> | >


> |
> | <snip>
> |
> | Hi, and thanx for the reply,
> |
> | Possibly it should be, but in this case it isn't. Any clues?
> What exactly doesn't work if you simply specify method="post" in your
HTML?
> |
> | Ran a script to find the problem and this is what I got (if any help):
> (snip)
> | REQUEST_METHOD --> GET
> (snip)
> This is just an info on what the current script uses. POST _should_ be
still
> enabled.

Hi,

The problem I have is that when trying to run a CGI script that uses POST,
the following error message occurs:

HTTP Error 405
405 Method Not Allowed

The method specified in the Request Line is not allowed for the resource
identified by the request. Please ensure that you have the proper MIME type
set up for the resource you are requesting.

As far as I know, it's just down to the CGI using POST. And I could well be
wrong anyways.

But I wanted to start go through the basics first as to what might be
causing this script to fail.

T.

 
 
 

Newbie question - Adding "POST" to httpd.conf file?

Post by Nemesis Service » Fri, 18 Jan 2002 04:33:48


http://httpd.apache.org/docs/misc/FAQ-F.html#POSTnotallowed
 
 
 

Newbie question - Adding "POST" to httpd.conf file?

Post by BY2 » Fri, 18 Jan 2002 09:48:31




Quote:> http://httpd.apache.org/docs/misc/FAQ-F.html#POSTnotallowed

Have read the document provided for which many thanks.

So, do I take it that if I just add the following:

AddHandler cgi-script .cgi

to either my httpd.conf file (currently in etc/httpd/conf/ ) or to a
.htaccess file in the same directory as that needed to accept the POST forms
(currently www.mydomain.com/cgi-bin/ , that will be enough to handle POST
forms?

Sorry if I sound a little sceptical, but being a newbie means a steep
learning curve for new operating systems.

And besides other CGI files in the same directory already work (but they use
the "GET" method, not POST). So, it isn't a question of "are the scripts
executing OK?". Am I making myself clear?

T.

 
 
 

1. named.conf "option forwarder" vs. resolv.conf "nameserver"?

Can someone explain to this DNS/BIND newbie the functional distinction
between the "options forwarder" in named.conf and the "nameserver" in
resolv.conf?

To me, they sound like they act identically: if a name cannot be resolved
locally, the specified remote host is called upon to do the resolution.

I currently have my RedHat v6.0 system (/w BIND v8.2) configured with the
addresses of 2 nameservers in /etc/named.conf.  If a name can't be resolved
from my local cache, the request for resolution is forwarded to either the
primary or secondary nameserver of my ISP, both listed in /etc/resolv.conf.
I'm wondering, though, if there would be any advantage in having the
addresses of those nameservers in "options forward" statements.  Would
there?

Thank you.

***** Steve Snyder *****

2. OAK OTI-87 not supported ?

3. HTTPd 1.5 dumps core when httpd.conf has "Group #-1"

4. lpd filtering remote printer?

5. APACHE 1.1.1 httpd.conf and the "httpd -f ..." option

6. cobalt and linux

7. GETSERVBYNAME()????????????????????"""""""""""""

8. QoS help

9. CGI "newbie" and change unix password method="POST"

10. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

11. Newbie question about "Listen" and "Bind address"

12. "Standard Journaled File System" vs "Large File Enabled Journaled File System"

13. newbie question samba.conf "allow hosts"