Solved

How do I use POST in C?

Posted on 1997-03-04
2
200 Views
Last Modified: 2013-12-25
   I have made a page:  http://www.east.cn.net/~hyjin/chpass.html  and also design a CGI program with C.  I compiled the C program to executable file.  And the URL is http://www.east.cn.net/~hyjin/cgi-bin/chgpasswd.cgi

    But when I click the "Submit" button in the page, it comes out the following error:

501 Not Implemented
We are sorry to be unable to perform the method POST to non-script at this time or to this document.

    Why does this error happen?  Is the httpd version too old to support the POST method under C executable CGi program?  Should I have to use the Perl/Java/B Shell to write the CGI if I want to use POST method?

    Please reply to my E-mail box also:

    mailto://hyjin@moon.bjnet.edu.cn

    Thanks for your kindly help!

Yours sincerely,
Teddy He
Mar 4, 1997
0
Comment
Question by:hyjin
2 Comments
 
LVL 3

Expert Comment

by:pc012197
ID: 1827636
I suggest you talk to your server administrator.
The way I see it, your server *does* recognize POST, but it refuses to execute your program with POST, probably due to the server configuration.

Have you tried using POST with a CGI script in the same location?
Just use any dummy script to see if you get the same error or another one.

0
 

Accepted Solution

by:
gotlieb earned 100 total points
ID: 1827637
pc is right.  Sounds to me like your server does not support CGI from your user directory.  This is pretty common.

To explain, the httpd daemon(web server) is usually configured to only execute scripts or other executables from certain directories.  This is a security measure designed to prevent users from misusing the server's userid(it usually runs as root, the superuser).  You'll have to check with your administrator about their policies on allowing users to execute CGI programs in their home directories.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question