Solved

How do I use POST in C?

Posted on 1997-03-04
2
196 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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
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 …
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…
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 …

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now