Solved

32bit compiler / Header Problem

Posted on 1997-08-04
8
196 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
[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
  • 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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
 

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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

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…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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 the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

705 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