Apache Server configuration support - apache not running perl scrripts

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > September 2005 > apache not running perl scrripts





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author apache not running perl scrripts
tony

2005-09-28, 6:04 pm

my apache configuration is not running some PERL script tests.

for example

#!/usr/bin/perl -w

use strict;

my $REMOTE_USER = $ENV{'REMOTE_USER'};

require 'util.pl';

print "Content-type: text/html\n\n";

print "<html>";

test_title(1, "basic WebAuth test");

print<<EOS;

You are accessing a webauth-protected page as the user: $REMOTE_USER<br>
<br>
This test tests the basic ability of WebAuth to protect a page.
<br>
EOS

&return_links;

&dump_stuff;

print "</html>";


when i click on this as a link, it just shows me the text instead of html
content it supposed to generate with perl


Davide Bianchi

2005-09-28, 6:04 pm

On 2005-09-28, tony <none@none.com> wrote:
> when i click on this as a link


You are not supposed to click on it as a link but to call him throught
apache typing http://your.host.name.here/cgi-bin/yourscript.pl
in the address bar.

Something make me think that 1) you are not calling the script throught
apache or 2) the script isn't in a cgi-bin enabled directory.

Davide

--
Windows is the best $89 solitaire game you can buy.
Michael Kalinka

2005-09-29, 8:51 pm

tony wrote:

> my apache configuration is not running some PERL script tests.
>
> for example
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $REMOTE_USER = $ENV{'REMOTE_USER'};
>
> require 'util.pl';
>
> print "Content-type: text/html\n\n";
>
> print "<html>";
>
> test_title(1, "basic WebAuth test");
>
> print<<EOS;
>
> You are accessing a webauth-protected page as the user: $REMOTE_USER<br>
> <br>
> This test tests the basic ability of WebAuth to protect a page.
> <br>
> EOS
>
> &return_links;
>
> &dump_stuff;
>
> print "</html>";
>
>
> when i click on this as a link, it just shows me the text instead of html
> content it supposed to generate with perl

Its not clear how the HTTP-is built :
If you don't use the module CGI the header has to begin with
print "Content-type:text/html\n\n";
print "<html><head></head><body>";
..........
print "</body></html>";

What says the apache-error log ?

By
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com