Question

how to install CGI on IIS server

Asked by: ellandrd

i currently am running MS IIS server and can run asp, php and perl on it, but now want to run cgi scripts!

when i installing perl to run on IIS i though it mite allow cgi scripts to run too but when i process a cgi script from a action method in an html form, i get blank screen with error mesages so it has me now thinking, i cant run cgi scripts!

but my question is CAN you run them on IIS server??

if so how do i?, and do i have to install anything else? or is my config for the perl not correct?

i used an auto installer for the perl so i didnt config anything if his help for my question??

500 points awarded!!!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-06-17 at 05:35:04ID21028779
Tags

iis

,

cgi

Topics

CGI Scripting

,

Server Side Includes (SSI)

Participating Experts
2
Points
500
Comments
21

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. ASP vs. CGI/Perl
    Can ASP replace CGI/Perl functionality? Totaly?
  2. How to setup a apache server to run cgi , perl , and asp ?
    Now I try to run cgi from my apache web server but it reply that I have no permisson to access the cgi file , how to solve this problem ? how to setup a apache server to run cgi ,perl . Can apache run .asp ? what should I install in apache and can it run all the asp jus...
  3. ASP or CGI
    When developing a commercial web-site is it better to use CGI scripting or ASP. what are the main differences to separate these.
  4. CGI?
    ok, i am a javascipt,css,html guy. I would like to know how to start writing cgi. Anyone have any tutorials or wanna teach me? TIA i have plenty of points jAy

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ospinalaPosted on 2004-06-17 at 06:40:38ID: 11334502

Yes you can run CGI scripts.  What you want to do is in IIS, go to the properties for your website.  Then select the Home Directory tab.  Make sure that execute permissions is set to Scripts and Executables.  Then push the Configuration button.  Make sure that you have a mapping for the cgi extension.  If you don't duplicate the setting for the pl extension exactly.  This should allow your cgi scripts to run properly.

 

by: ellandrdPosted on 2004-06-17 at 07:16:07ID: 11334870

so let me get this right? say my website is called "testpages" ok? so i browse to control panel --> admin tools --> internet information services --> websites --> default websites --> testpages, click on properties, set execute permissions to "Scripts and Executables", click config!

i dont have a cgi extension but im not 100% sure on how about doing this?

you said duplicate the setting for pl extension exactly? but do i change it to cgi inside of pl?? or just have two pl extensions??

 

by: ospinalaPosted on 2004-06-17 at 07:21:29ID: 11334924

You need to make a setting for cgi extension that duplicates the setting for pl extension.  You will have one cgi extension setting and one pl extension setting.  Here is what mine looks like:

Extension       Executable Path                                Verbs
.pl                C:\Perl\bin\perl.exe "%s" %s             GET,HEAD,POST
.cgi              C:\Perl\bin\perl.exe "%s" %s             GET,HEAD,POST

Just click ADD and enter the setting for .cgi extension.  Of course there are more mappings than I am showing above, but the cgi extension is what you need to make sure you have.

 

by: ellandrdPosted on 2004-06-17 at 07:30:12ID: 11335026

ok i done that and i still cant get my cgi scripts to work!!

i created a second extension for cgi as you said:

clicked on properties, set execute permissions to "Scripts and Executables", clicked config, clicked add, entered c:\perl\bin "%s" %s because this is what the pl extension had and in the extention box i typed .cgi and clicked add.

when to localhost typed in my url for the testpages and my cgi didnt work??

did you just mean for me to create a second copy of the pl extension without typing .cgi in the extension box or did i do it correctly??


 

by: ospinalaPosted on 2004-06-17 at 07:32:55ID: 11335057

you did it correctly except the path to Perl.  You need to make sure the path matches the pl extension path.  What you wrote in your response C:\perl\bin "%s" %s is definitely wrong because you don't have the perl.exe (C:\Perl\bin\perl.exe "%s" %s).  Not sure what your path is, just duplicate what is under the pl extension.

 

by: ellandrdPosted on 2004-06-17 at 07:35:32ID: 11335090

ok i donr that and its still not working?? my path is C:\perl\bin\perl.exe "%s" %s...

any other ideas??

 

by: ellandrdPosted on 2004-06-17 at 07:49:11ID: 11335225

ok im trying to solve my problem??

maybe im doing something wrong in the HTML page??

when i click submit on a HTML form, i have got the action method to process the cgi script ---> action="cgi-bin/cc_ver.cgi"

on the next page with the cant find page cannot be found crap, the url in the address bar is:

"http://localhost/testpages/cgi-bin/cc_ver.cgi" ok?

rite in my testpages folder on my c: drive where i have test.html & cc_ver.cgi, i have no folder called "cgi-bin" so is this the problem?? if so how do i over come this??

 

by: ospinalaPosted on 2004-06-17 at 08:16:16ID: 11335532

Yes that would be a problem.  make action="cc_ver.cgi"

 

by: ospinalaPosted on 2004-06-17 at 08:16:56ID: 11335547

Are you sure that perl is located at c:\Perl\bin\perl.exe?  I'd also double check that

 

by: ellandrdPosted on 2004-06-17 at 08:22:25ID: 11335611

so i took out the cgi-bin in the action,

ok how would i double check to see if perl is in c:\perl\bin\perl.exe?? sorry im new to perl and cgi installation stuff...

i checked and there is an program called perl with a description saying perl command line interpreter. is this the perl.exe??

if not, then perl.exe is not in the folder c:\perl\bin!!

 

by: ospinalaPosted on 2004-06-17 at 08:23:57ID: 11335626

What was the executable path for the pl extension in IIS (from the above directions)?  That should tell you the path to Perl.

 

by: ellandrdPosted on 2004-06-17 at 08:26:43ID: 11335648

it was c:\perl\bin\perl.exe "%s" %s, i copied every thing you said from above...

 

by: ellandrdPosted on 2004-06-17 at 08:28:18ID: 11335668

what does the "%s" %s stand for or do??

 

by: ospinalaPosted on 2004-06-17 at 08:29:22ID: 11335674

try going to the command prompt (MS-DOS Prompt).  Then navigate to the folder you have cc_ver.cgi and type in the following: perl -w cc_ver.cgi

That will run the application from the command prompt and list out any errors.

 

by: ellandrdPosted on 2004-06-17 at 08:38:08ID: 11335788

hee hee i have done that and the errors listed are for the html file...

"Bareword found where operator expected at test.html line 2, near 'cc-ver.cgi method'"

i think it trying to tell me that im missing quots around my method??

in my html page i have:

<form action="cc-ver.cgi" method=post>
....

would the problem be, because i dont have qouted around post??

should it be method="POST"??

ill try this and get back to you...



 

by: ellandrdPosted on 2004-06-17 at 08:43:16ID: 11335843

my html page is as follows:

<HTML>
<FORM ACTION="cc_ver.cgi" METHOD="POST">
<B>Would you like to pay by Credit Card?</B><BR>
<INPUT TYPE="RADIO" NAME="payby" VALUE="yes"> <B>Yes</B><BR>
<INPUT TYPE="RADIO" NAME="payby" VALUE="no"> <B>No</B><BR>
<P><B>**</B> If you answered &quot;Yes&quot;, please fill in the following...
<P>
<B>CC Type:</B><BR>
<INPUT TYPE="RADIO" NAME="cardtype" VALUE="visa"> <B>Visa</B><BR>
<INPUT TYPE="RADIO" NAME="cardtype" VALUE="mastercard"> <B>MasterCard</B><BR>
<INPUT TYPE="RADIO" NAME="cardtype" VALUE="amex"> <B>American Express</B><BR>
<INPUT TYPE="RADIO" NAME="cardtype" VALUE="novus"> <B>Novus (Discover)</B>
<P>
<INPUT TYPE="TEXT" NAME="cardholder" SIZE="30"> <B>Cardholder's Name</B><BR>
<INPUT TYPE="TEXT" NAME="cardnumber" SIZE="20"> <B>Card Number</B><BR>
<INPUT TYPE="TEXT" NAME="cardexp" SIZE="5"> <B>Card Expiration Date</B>
<P>
<INPUT TYPE="SUBMIT" VALUE="Check"> <INPUT TYPE="RESET" VALUE="Clear/Reset">
</FORM>
</HTML>

in the command prompt the errors are telling me i have a missing operator before method???

any ideas?

if you want the points for helping me so far say so, and if we get it working ill give you more...

 

by: ellandrdPosted on 2004-06-17 at 08:45:27ID: 11335867

when i try executing cc_ver.cgi fro mthe command prompt it telling ive not such file or directory?? weird!!

 

by: ospinalaPosted on 2004-06-17 at 09:01:39ID: 11336055

HTML looks fine.  When trying to execute cc_ver.cgi from the command prompt, did you navigate to the directory where cc_ver.cgi is?  If you're getting that message (no such directory), try a dir to see if the file exists in that directory.

 

by: ellandrdPosted on 2004-06-18 at 00:49:12ID: 11342159

well i put my html page test.html & cgi script cc_verc.cgi now into c:\perl to in the cmd i nav to that directory and called cc_ver.cgi and got no errors... but if i try to process a cgi script form another folder i get errors....

i tried another cgi exmaple that i have nad called it from the localhost and it worked fine but if i try called HTML page first and then process cgi script  from action method in html form it does not work!!!

 

by: ellandrdPosted on 2004-06-18 at 00:52:52ID: 11342183

got it working.... thanks for all the help!!!

 

by: kwickwayPosted on 2005-03-13 at 12:02:12ID: 13530012

Also, for anyone who is having problems with this still, check out this link...
http://www.visualwin.com/Perl/

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...