in reply to Re^3: How do I get my webserver to execute Perl CGI scripts?
in thread How do I get my webserver to execute Perl CGI scripts?

okay, i tried something really easy i found to check if perl was working correctly. i have an html that has
<html> <head> <title>Tell Me Your Name</title> </head> <body> <form action="i:/oracle/isuites/apache/apache/cgi-bin/name.cgi"> <p>Enter your name:<input name="name" /></p> <p><input type="submit" value="Submit Me!"></p> </form> </body> </html>
and the cgi has
#!I:/ORACLE/iSuites/Apache/perl/5.00503/bin/MSWin32-x86/perl -w use strict; use CGI qw(:standard); print header; print start_html('Hello'); print "<h1>Hello, ", param('name'), "!</h1>\n"; print end_html;
I is the correct drive for perl....I compiled the cgi and it worked fine. when i open the html and click submit it brings the perl to the browser.

Replies are listed 'Best First'.
Re^5: How do I get my webserver to execute Perl CGI scripts?
by kutsu (Priest) on Sep 02, 2004 at 20:43 UTC

    If you've setup apache to use a cgi-bin (which jbodoni already has explained), you should be able to call the cgi script with <form action="/cgi-bin/name.cgi" method=post>. That is as long as you've created the cgi-bin in your Document Root directory: the default of this is "/var/www/html", with cgi-bin being in "/var/www/cgi-bin". You can find out for sure by looking at httpd.conf.

    The fact that you looked at I: for the script makes me wonder if apache is even started/installed, test this by typing http://localhost/ into a browser.

    "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce