httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barth \(John\) Jones" <musicbyba...@alltel.net>
Subject [users@httpd] cgi
Date Fri, 04 Jun 2004 22:14:44 GMT
I'm trying to test a cgi script on my Apache2Triad server installed on a WindowsXPPro platform.
 My cgi-bin is in my server root, which is c:/apache2triad/, and I have my ScriptAlias set
to the following:

ScriptAlias /cgi-bin/ "C:/Apache2triad/cgi-bin/"

<Directory "C:/apache2triad/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

I have a script called testcgi.pl in the cgi-bin.  When I go to my browser and type http://localuser/cgi-bin/testcgi.pl
I get that stupid perfectnav search engine.  When I run it in Windows9x I get the following:

C:\apache2triad\cgi-bin>perl testcgi.pl
Content-Type: text/html; charset=ISO-8859-1

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"><head><
title>Untitled Document</title>
</head><body></body></html>
C:\apache2triad\cgi-bin>

Can somebody please explain where I'm going wrong?  I'm pretty sure the testcgi.pl code is
ok but here it is just in case (it should throw back a blank page):

#!/usr/local/bin/perl

    use CGI ':standard';

    print header();
    print start_html();

    for $i (param()) {
        print "<b>", $i, "</b>: ", param($i), "<br>\n";
    }

    print end_html();

Thanks
Mime
View raw message