Solved

How do I use POST in C?

Posted on 1997-03-04
2
199 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Update a registry value to every user hive 15 82
Powershell variable with -SearchBase cmdlet 2 120
Where do I learn ES6? 3 68
Powershell  and PSExec = Password failure 5 22
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

777 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