Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I use POST in C?

Posted on 1997-03-04
2
Medium Priority
?
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

Question has a verified solution.

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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

670 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