Re: Apache and Perl in Windows
- From: Brian Wakem <no@xxxxxxxxx>
- Date: Fri, 23 Dec 2005 20:24:17 +0000
Arn Anderson wrote:
> Hi and Merry Christmas. I am having a problem. The cgi scripts execute,
> but the output is empty. I am studying a spider book that uses Perl so I
> download perl and Apache, then uncomment out the lines in the web.xml
> file in apache and rename the jar files in the server directory. Then I
> launch apache and run my script using an HTML file. The script executes,
> but I don't see any results. Perl works fine separately and so does
> Apache. But together, they don't. Here is the source code for the 2
> files. I think this has to do with permissions, but when I installed
> Apache, I used the same account and password as my Windows username and I
> am administrator. I am out of ideas. If anyone knows what is going wrong,
> I would appreciate the help. Thank you.
>
> <HTML>
> <HEAD>
> <TITLE>Environment Variables
> using GET</TITLE>
> </HEAD>
> <BODY>
> <FORM ACTION="cgi-bin/exp.cgi" METHOD="GET">
> Press submit for a list of environment variables. <BR>
>
> First Name: <input type=
> "text" name="fname" size=
> 30><p>
> Last Name: <input type="text"
> name="lname" size=30><p>
> <input type="submit">
> </form>
>
> <FORM>
> </BODY>
> </HTML>
>
>
>
>
> #!c:\Perl\bin\perl.exe
> use CGI qw(:all);
> use Strict;
Should be lower case s.
> use LPW::Simple;
I don't believe this module exists, so your code does not compile.
> print "Content-type: text/plain\n\n";
Why use the CGI module and print your own headers?
> foreach $var (sort keys %ENV) {
Global symbol "$var" requires explicit package name at ....
> print "$var=\"$ENV{$var}\"\n";
> }
>
> @values = split(/&/,$ENV{'QUERY_STRING'});
Global symbol "@var" requires explicit package name at ...
There are many more errors. I can't be bothered to point them all out.
Needless to say the code does not compile.
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
.
- Follow-Ups:
- Re: Apache and Perl in Windows
- From: Paul Lalli
- Re: Apache and Perl in Windows
- References:
- Apache and Perl in Windows
- From: Arn Anderson
- Apache and Perl in Windows
- Prev by Date: Eval not reseting
- Next by Date: Re: Eval not reseting
- Previous by thread: Apache and Perl in Windows
- Next by thread: Re: Apache and Perl in Windows
- Index(es):
Relevant Pages
|