[Xitami] Fw: ActivePerl & Xitami - CGI problems Continued

Peter van der Goes xitami@lists.xitami.org
Sun, 22 Sep 2002 08:31:50 -0500


----- Original Message -----
From: "Peter van der Goes" <pvdg@worldnet.att.net>
To: "$Bill Luebkert" <dbe@wgn.net>
Sent: Sunday, September 22, 2002 7:46 AM
Subject: Re: ActivePerl & Xitami - CGI problems Continued


> Answers in context, but first, thanks for responding!
>
> ----- Original Message -----
> From: "$Bill Luebkert" <dbe@wgn.net>
> To: "Peter van der Goes" <pvdg@worldnet.att.net>
> Cc: <activeperl@listserv.ActiveState.com>
> Sent: Saturday, September 21, 2002 8:42 PM
> Subject: Re: ActivePerl & Xitami - CGI problems Continued
>
>
> > Peter van der Goes wrote:
> > > This is a follow-up to my previous post requesting help with the
subject
> > > combination. In the first post, I listed the content of a simple web
> > > page passing a short string to a simple CGI script. I very probably
> > > should have stated this the first time around, but the page and script
> > > work fine if the script is served from the web server provided by the
> > > author of the book where these beginner examples are published. So, I
> > > don't believe the script itself is the problem.
> >
> > Are you saying that the author has a similar script that you copied and
> > it works fine on his site ?  That really means nothing since you can't
> > even be sure that the script is identical (although it probably is).
> > You're probably dealing with a config issue here.
>
> I agree completely, and am asking at the textbook author's Q&A page as
well
> as in the Xitami mailing list. I asked here because ActivePerl says it
will
> "automatically" configure Xitami for Perl/CGI during install, and so hoped
> that somrbody might have the same combination working.
> >
> > > I have tried some suggestions offered by helpful people with the
> > > following results:
> > >
> > > "Put the complete URL of the Web Server being asked to serve the CGI
in
> > > the action line of the web page."
> > > Works correctly if I use the book author's URL, still fails when I try
> > > to use my local Xitami installation (get a blank page)
> >
> > Forget the author's url for the time being.  What happens when you
> > bring up http://localhost/ or http://127.0.0.1/ ?
>
> I get the Xitami home page. No problems at this point.
> >
> > What happens when you bring up http://localhost/cgi-bin/testcgi or
> > http://localhost/cgi-bin/testperl.pl ?
>
> Actually, I *can* bring up a simple script called perltest.cgi (or .pl,
for
> that matter).
> Here is the syntax which works:
>
> #!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!\n";
>
> The trouble starts as soon as I try to get Xitami to serve an HTML page
> which calls a CGI through an action statement. This part always fails. I
> have the URL correct in the action line of the HTML, and the shebang line
on
> the script points to perl.exe. The result is always a blank page, with the
> address window in IE indicating the requested script (e.g.
> http://127.0.0.1/cgi-bin/animal.pl).
> When I view source, all I get is the empty HTML shell,  generated by CGI?,
> with nothing between <BODY> and </BODY>, indicating that Perl didn't
> interpret the script commands?
> >
> > > "Active Perl only interprets .pl files, not .cgi."
> > > Changed the extension of animal.cgi to animal.pl. No difference noted.
> > > Still get a blank page. If I change the extension on the simple,
> > > self-contained script that *will* run, it runs equally well with
either
> > > .cgi or .pl as the extension.
> >
> > ActivePerl will interpret any file extension - ignore that.  Stick with
> > .pl for now.
> >
> > Have you checked all log files ?
>
> OK, here's where my bright green color in this area shows. I looked in the
> log file in the Xitami directory, and they are empty. I guess that means
> logging is turned off by default and that I need to figure out how to turn
> it on?
> >
> > Have you modified the default config ?
> If you are referring to Xitami's defaults.cfg file, yes.
> To get PHP to work (the ultimate goal is one local web server that will
> serve both PHP and Perl/CGI scripts), I had to add a section to the file
as
> follows:
> [mime]
> Php-application/x-httpd-php4
> Under the existing [filter] section, I added
> [filter] <-- already in script
> .php=C:\PHP\php.exe
>
> >
> > Have you examined the source (view source) from the browser to see what
> > it's getting ?
> It's getting the empty HTML shell generated (I believe) by CGI. As here:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>
>
> >
> > --
> >    ,-/-  __      _  _         $Bill Luebkert   ICQ=162126130
> >   (_/   /  )    // //       DBE Collectibles   Mailto:dbe@todbe.com
> >    / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for
Perl)
> > -/-' /___/_<_</_</_     Castle of Medieval Myth & Magic
> http://www.todbe.com/
> >
> > _______________________________________________
> > ActivePerl mailing list
> > ActivePerl@listserv.ActiveState.com
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
>