Solved

32bit compiler / Header Problem

Posted on 1997-08-04
8
179 Views
Last Modified: 2013-12-25
I'm trying to do a compiled C CGI script on an NT web server.  I've used GNU/GCC on Linux before on Unix servers with no problem. I'm using the Cygnus 32bit compiler and getting a good executable but when I transfer it to the NT server and execute it I get a
"CGI Error ....did not return a complete set of HTTP headers.  The headers it did return are:   "

Help Please!
0
Comment
Question by:welcome080397
  • 4
  • 3
8 Comments
 
LVL 7

Expert Comment

by:faster
ID: 1829537
Linux and NT is totally different platform, so you can not use the complier on linux and then expect it to work on NT.  You will need win32 compiler such MSVC or Borland C++.
0
 

Author Comment

by:welcome080397
ID: 1829538
Cygnus is a Win 32-bit compiler and the programs execute fine under Windows 95.
0
 
LVL 7

Expert Comment

by:faster
ID: 1829539
Then what APIs you have been using?  What is the output if you run it directly on the command line? (you can set necessary env and use a file to simulate the POST entity body).

Maybe you can show us your code.
0
 
LVL 4

Expert Comment

by:feenix
ID: 1829540
You have forgotten to include the HTTP-headers in your CGI-BIN.
Make sure you have at least this in the beginning of your code:

printf("Content-type: text/html\n\n");

Make sure there are _two_ linefeeds in the end. After that you can output whatever you want and it'll work fine.

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:welcome080397
ID: 1829541
Sorry,
I will put more info on future questions.
I have
printf("Content-type: text/html\n\n");
as my first line.

0
 

Author Comment

by:welcome080397
ID: 1829542
More Info:
Cygnus (to the best of my knowledge) is a 32bit compiler.
The code is basically as follows:

printf("Content-type: text/html\n\n");
printf("<html><head><title>Test</title></head>");
printf("<body>This is a test</body></html>");

Is executes fine in Windows 95 and that output is produced.
Is is possibly a permission problem?
0
 
LVL 7

Accepted Solution

by:
faster earned 100 total points
ID: 1829543
So your program can be successfully executed from command line.  If what you show is your real program and it does not work, it must be the misconfiguration of web server.  What server are you using?  If Information server from microsoft, then you must put it in the CGI category (WIN CGI and SHELL CGI will not do.)  Try to make some logging and see whether your program is ever called by the server.
0
 

Author Comment

by:welcome080397
ID: 1829544
It seems that after many confirmations that I had executeable status - I DID NOT. Seems that the provider had trouble in the past and no longer gives execution privleges.  My only hope is that they go down in flames just like all other businesses that that don't work with their customers.
They made me waste a lot of time.

Thanks faster.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
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…

762 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

19 Experts available now in Live!

Get 1:1 Help Now