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

x
?
Solved

How to debug CGI 404

Posted on 2007-04-04
9
Medium Priority
?
420 Views
Last Modified: 2013-12-25
We have an old home-grown CGI application that has been running with no problem for many years.  I am in the process of reinstalling it on a new server. The old one is running windows 2000 server, the new one is 2003 server.

Unfortunately, I've never worked with CGI before. This CGI is an EXE file. When I run it in a cmd window I can see the HTML output. When it is referenced in a URL it generates a 403 error. I've set up the folder security as best as I know how (the non-CGI stuff displays OK).  The IIS log just shows the URL and the 403 error so that didn't help any. I tried to capture the output HTML from running the CGI and load that into the browser directly but that hung up the browser (IE6).

Since I don't really understand CGI yet, I'm looking for some debugging suggestions. Also, I did a filemon and the only thing that looked like a possible problem was that it was looking for some kind of "manifest" file that it couldn't find. Not sure if that is of any significance. I tried to look up how manifest relates to CGI but I didn't get anywhere.
0
Comment
Question by:adg
[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
9 Comments
 
LVL 3

Author Comment

by:adg
ID: 18854126
I'm sorry - this is a 404 - Not found error, not 403 as described above.
0
 
LVL 48

Accepted Solution

by:
Tintin earned 668 total points
ID: 18854265
What IIS setup have you done to allow CGI scripts to run?
0
 
LVL 19

Assisted Solution

by:Kim Ryan
Kim Ryan earned 668 total points
ID: 18854661
404 menas resource was not found. So the URL cannot be converted to a the .EXE program you wnat to run. Could be a problem with the wya the path is deined, the base cgi-bin (or public_html) area.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:adg
ID: 18854692
Great question - sorry I forgot to mention it.  On IIS application configuration under home directory, configuration button on the default website I added an entry for exe and I pointed it at the cgi exe program itself. That didn't help so I did the same thing for the virtual directory that actually contains the exe. Still didn't help.  But I don't know how to verify that it is done correctly.
0
 
LVL 3

Author Comment

by:adg
ID: 18854698
>> Could be a problem with the wya the path is deined, the base cgi-bin (or public_html) area.

That is what I thought, but....

1. Non-CGI html  in the same folder as the CGI program is picked up OK.

2. Does this mean that the problem is with the path to the CGI or is it with something the CGI is emitting? That is probably a dumb question but I just started learning CGI yesterday.
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 664 total points
ID: 18854723
> Non-CGI html  in the same folder as the CGI program
then how does your HTTP server tell whether or not it is a CGI program?
what does the configuration look like?
0
 
LVL 3

Author Comment

by:adg
ID: 18854757
>> then how does your HTTP server tell whether or not it is a CGI program?

I don't know - aside from adding the entries that I mentioned above am I supposed to do something else?

I'm just saying that if I put a regular html page in the same (virtual directory as the exe file the browser gets to it ok. Regarding the configuration, aside from what I mentioned above,  I'm not sure what to say. Pardon my ignorance - can you ask me a more specific question?
0
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 18855066
You can use IIS to see waht cinfiguration settings it has for
a) path toe executable (the cgi-bin) area
b) file associations (eg .exe is a program)
Not sure how to display it but there should be some online doc that comes with IIS

Maybe post this question in Web Servers/IIS topic area?
0
 
LVL 3

Author Comment

by:adg
ID: 18855218
Unfortunately something has come up that takes precedence. Thanks for your consideration and assistance.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
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)

688 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