Help showing perl script?

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
gutterbids
-


Joined: 29 Jul 2003
Posts: 1

PostPosted: Tue Jul 29, 2003 3:12 am    Post subject: Help showing perl script? Reply with quote

Hello,

I downloaded Abyss Web server and installed it to

C:\Program Files\Abyss Web Server

and it appears to be running fine, I also downloaded Active perl 5.6.1 Build 635 and installed it to

C:\Perl

I did the setup as required but tried to run a script that more or less give the paths and it directed it to the proper path but more or less Printed out the script rather than running it, I'm not sure if my path is incorrect set on it or not, but below is the script , any help would be appreciated.

Code:
#!/usr/bin/perl
#!perl
#!/usr/bin/perl5
#!/usr/local/bin/perl
#!/usr/local/bin/perl5

#-###############################################################
# envtest Environment Variables Display

                my $sendmail =`whereis sendmail`;
                my $plocation =`whereis perl`;
                my @perlloc = split(" ",$plocation);
                my @mailloc = split(" ",$sendmail);
                   my $font = '<FONT FACE="Verdana, sans serif" SIZE=2>';

    print "Content-type:  text/html\n\n";
    print qq~<HTML>

<body bgcolor="#FFFFFF" ALINK="#FDB900" LINK="#BF0425" VLINK="#1200FD">

<br><P>
<br><P>

<CENTER><TABLE BGCOLOR=#96A8C3 BORDER=0 WIDTH=95% CELLPADDING=2>
<TR><TH>$font<FONT SIZE=4>Server Program Paths</FONT></TD></TR></TABLE></CENTER>

<P>

<CENTER><TABLE BORDER=1 WIDTH=95% CELLPADDING=2>
<TR><TD WIDTH=35%>${font}<B>Perl Executable:</B></TD>
<TD WIDTH=65%>${font}$^X</TD></TR>
<TR><TD>${font}<B>Perl Version:</B></TD>
<TD>${font}$]</TD></TR>
<TR><TD>${font}<B>PERL compile version OS:</B></TD>
<TD>${font}$^O</TD></TR>
<TR><TD>${font}<B>GID</B>: <FONT SIZE=1>(If not blank, you are on a machine that supports membership in multiple groups simultaneously)</FONT></TD>      <TD>${font}$<</TD></TR>
<TR><TD VALIGN=TOP>${font}<B>Location of Perl:</B></TD>
<TD>${font}~;
           foreach $loc(@perlloc){
           print "$loc<BR>\n";
           }
print qq~</TD></TR>
<TR><TD VALIGN=TOP>${font}<B>Location of Sendmail:</B></TD>
<TD>${font}~;
           foreach $ml(@mailloc){
           print "$ml<BR>\n";
           }
print qq~</TD></TR>
<TR><TD VALIGN=TOP>${font} <B>Directory locations searched for perl executables</B></TD><TD>$font~;
           foreach $item(@INC){
           print "$item <BR>\n";
           }
print qq~</TD></TR>
</TABLE></CENTER>

<P>

<CENTER><TABLE BGCOLOR=#96A8C3 BORDER=0 WIDTH=95% CELLPADDING=2>
<TR><TH>$font<FONT SIZE=4>Environment Variables</FONT></TD></TR>
</TABLE></CENTER>

<P>

<CENTER><TABLE ALIGN=CENTER BORDER=1 WIDTH=95% CELLPADDING=2>~;
          foreach $fieldname(keys %ENV){
print qq~<TR><TD WIDTH=35%><B>${font}$fieldname</B></TD>
<TD WIDTH=65%>${font}$ENV{$fieldname}</TD></TR>~;
          }
print qq~</TABLE></CENTER>

<br><P>
<br><P>

</BODY></HTML>~;
Back to top View user's profile Send private message Visit poster's website
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Jul 29, 2003 3:42 am    Post subject: Reply with quote

Your script runs fine on my abyss server. make sure you put the path as

C:\Perl\bin\perl.exe

and in assoiciated extensions put cgi pl

be sure to put in the cgi paths as /cgi-bin
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group