[Xitami] Xitami & Active Perl on Win 2000 - CGI Script Problem

Peter van der Goes xitami@lists.xitami.org
Fri, 20 Sep 2002 22:18:00 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_010D_01C260F3.94829360
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Beginner here! Running Win 2000 SP2.
I've set up a local Xitami web server, then installed Active Perl (both =
latest versions downloaded within the last week). During the Active Perl =
installation, I selected Xitami as the web server to automatically =
configure.
When I tried a simple Perl script:

#!F:\Perl\bin\perl.exe -wT

print "Content-type:text/html\n\n";
print "Show me the money! The Active PERL interpreter is working with my =
web server!";

the printed content shows up in my browser, leading me to believe that =
Perl is working. However, when I try to use a HTML page like:

<html>
<head>
 <title>Animal</title>
</head>
<body>
<form action=3D"animal.cgi" METHOD=3DPOST>
Which animal? <INPUT type=3D"text" name=3D"animal">
<P><INPUT type=3D"submit">
</form>
</body>
</html>

to pass a string to a CGI script like:

#!F:\Perl\bin\perl.exe -wT
use strict;
use CGI ':standard';

my $animal;
$animal =3D param('animal');

print "Content-type: text/html\n\n";
print "Show me the $animal";

the result is a blank page.=20
When I view->source for the blank page, I get:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252"></HEAD>
<BODY></BODY></HTML>

As stated, I'm new to all this and don't know what to try next.=20
I had a similar problem getting PHP to work which was solved by adding =
an entry to Xitami's Defaults.cfg file under the [mime] heading. Is =
there an entry I must add to get Perl/CGI scripts going as well?

Any help gratefully accepted!
**********************************************************************
**  All opinions are mine alone.Do not attribute elsewhere! =20
**********************************************************************
** Peter van der Goes, Professor, Computers & Information Technology
**                                        Rose State College
***********************  Contact  ************************************
** Office e-mail:  pvan@rose.edu
** Home   e-mail:  pvdg@.att.net
** Web Page:  http://www.rose.edu/Faculty/pvan/index.htm
**********************************************************************


------=_NextPart_000_010D_01C260F3.94829360
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>Beginner here! Running Win 2000 SP2.</FONT></DIV>
<DIV><FONT size=3D2>I've set up a local Xitami web server, then =
installed Active=20
Perl (both latest versions downloaded within the last week). During the =
Active=20
Perl installation, I selected Xitami as the web server to automatically=20
configure.</FONT></DIV>
<DIV><FONT size=3D2>When I tried a simple Perl script:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>#!F:\Perl\bin\perl.exe -wT</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>print "Content-type:text/html\n\n";<BR>print "Show =
me the=20
money! The Active PERL interpreter is working with my web =
server!";</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>the printed content shows up in my browser, leading =
me to=20
believe that Perl is working. However, when I try to use a HTML page=20
like:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT=20
size=3D2>&lt;html&gt;<BR>&lt;head&gt;<BR>&nbsp;&lt;title&gt;Animal&lt;/ti=
tle&gt;<BR>&lt;/head&gt;<BR>&lt;body&gt;<BR>&lt;form=20
action=3D"animal.cgi" METHOD=3DPOST&gt;<BR>Which animal? &lt;INPUT =
type=3D"text"=20
name=3D"animal"&gt;<BR>&lt;P&gt;&lt;INPUT=20
type=3D"submit"&gt;<BR>&lt;/form&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;</F=
ONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>to pass a string to a CGI script like:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>#!F:\Perl\bin\perl.exe -wT<BR>use strict;<BR>use CGI =

':standard';</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>my $animal;<BR>$animal =3D =
param('animal');</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>print "Content-type: text/html\n\n";<BR>print "Show =
me the=20
$animal";</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>the result is a blank page. </FONT></DIV>
<DIV><FONT size=3D2>When I view-&gt;source for the blank page, I =
get:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0=20
Transitional//EN"&gt;<BR>&lt;HTML&gt;&lt;HEAD&gt;<BR>&lt;META=20
http-equiv=3DContent-Type content=3D"text/html;=20
charset=3Dwindows-1252"&gt;&lt;/HEAD&gt;<BR>&lt;BODY&gt;&lt;/BODY&gt;&lt;=
/HTML&gt;</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>As stated, I'm new to all this and don't know what =
to try=20
next. </FONT></DIV>
<DIV><FONT size=3D2>I had a similar problem getting PHP to work which =
was solved=20
by adding an entry to Xitami's Defaults.cfg file under the [mime] =
heading. Is=20
there an entry I must add to get Perl/CGI scripts going as =
well?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Any help gratefully =
accepted!</FONT></DIV></FONT></DIV>
<DIV><FONT=20
size=3D2>****************************************************************=
******<BR>**&nbsp;=20
All opinions are mine alone.Do not attribute elsewhere!&nbsp;=20
<BR>*********************************************************************=
*<BR>**=20
Peter van der Goes, Professor, Computers &amp; Information=20
Technology<BR>**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Rose State College<BR>***********************&nbsp; Contact&nbsp;=20
************************************<BR>** Office e-mail:&nbsp; <A=20
href=3D"mailto:pvan@rose.edu">pvan@rose.edu</A><BR>** Home&nbsp;&nbsp;=20
e-mail:&nbsp; <A href=3D"mailto:pvdg@.att.net">pvdg@.att.net</A><BR>** =
Web=20
Page:&nbsp; <A=20
href=3D"http://www.rose.edu/Faculty/pvan/index.htm">http://www.rose.edu/F=
aculty/pvan/index.htm</A><BR>********************************************=
**************************<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_010D_01C260F3.94829360--