[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> </DIV>
<DIV><FONT size=3D2>#!F:\Perl\bin\perl.exe -wT</FONT></DIV>
<DIV> </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> </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> </DIV>
<DIV><FONT=20
size=3D2><html><BR><head><BR> <title>Animal</ti=
tle><BR></head><BR><body><BR><form=20
action=3D"animal.cgi" METHOD=3DPOST><BR>Which animal? <INPUT =
type=3D"text"=20
name=3D"animal"><BR><P><INPUT=20
type=3D"submit"><BR></form><BR></body><BR></html></F=
ONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>to pass a string to a CGI script like:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>#!F:\Perl\bin\perl.exe -wT<BR>use strict;<BR>use CGI =
':standard';</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>my $animal;<BR>$animal =3D =
param('animal');</FONT></DIV>
<DIV> </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> </DIV>
<DIV><FONT size=3D2>the result is a blank page. </FONT></DIV>
<DIV><FONT size=3D2>When I view->source for the blank page, I =
get:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0=20
Transitional//EN"><BR><HTML><HEAD><BR><META=20
http-equiv=3DContent-Type content=3D"text/html;=20
charset=3Dwindows-1252"></HEAD><BR><BODY></BODY><=
/HTML></FONT></DIV>
<DIV><FONT size=3D2></FONT> </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> </DIV>
<DIV><FONT size=3D2>Any help gratefully =
accepted!</FONT></DIV></FONT></DIV>
<DIV><FONT=20
size=3D2>****************************************************************=
******<BR>** =20
All opinions are mine alone.Do not attribute elsewhere! =20
<BR>*********************************************************************=
*<BR>**=20
Peter van der Goes, Professor, Computers & Information=20
Technology<BR>** &nb=
sp; &nbs=
p;  =
; =20
Rose State College<BR>*********************** Contact =20
************************************<BR>** Office e-mail: <A=20
href=3D"mailto:pvan@rose.edu">pvan@rose.edu</A><BR>** Home =20
e-mail: <A href=3D"mailto:pvdg@.att.net">pvdg@.att.net</A><BR>** =
Web=20
Page: <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--