Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > cgi-bin will no...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 1404 of 1478
Post > Topic >>

cgi-bin will not execute perl program

by lysterfieldcc@[EMAIL PROTECTED] (Whitsey) Jun 12, 2007 at 07:38 PM

I am trying to execute the printenv perl script in the cgi-bin
directory and it is printing the code instead of executing the
script.  Normally this is prety basic stuff setting this up however I
just can't get it to work.  I have gone through the Apache
do***entation and performed everything to the letter and the feedback
there is if it still doesn't work, do it again... There are only so
many times you can do the exact same thing...

I can run the script from the command line as the httpd user so Perl
is installed and the script works fine.

Perl = /usr/bin/perl

ScriptAlias /cgi-bin/ "/usr/local/apache2.0.54/bindist/cgi-bin/"

<Directory "/usr/local/apache2.0.54/bindist/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

(NOTE: I tried adding a forward slash to the end of the Directory
value but to no effect)

[conf]# cat ../cgi-bin/printenv
#!/usr/bin/perl
##
##  printenv -- demo CGI program which just prints its environment
##

print "Content-type: text/plain; charset=iso-8859-1\n\n";
foreach $var (sort(keys(%ENV))) {
    $val = $ENV{$var};
    $val =~ s|\n|\\n|g;
    $val =~ s|"|\\"|g;
    print "${var}=\"${val}\"\n";
}

I must be missing something but I can't for the life of me figure out
what it is???

Any help - please?
 




 9 Posts in Topic:
cgi-bin will not execute perl program
lysterfieldcc@[EMAIL PROT  2007-06-12 19:38:19 
Re: cgi-bin will not execute perl program
mumia.w.18.spam+nospam@[E  2007-06-13 04:24:27 
Re: cgi-bin will not execute perl program
lysterfieldcc@[EMAIL PROT  2007-06-14 00:24:06 
Re: cgi-bin will not execute perl program
mumia.w.18.spam+nospam@[E  2007-06-14 09:10:51 
List Problems?
bills@[EMAIL PROTECTED]   2007-06-14 10:08:37 
Re: List Problems?
sdavis2@[EMAIL PROTECTED]  2007-06-14 13:42:17 
Re: List Problems?
bills@[EMAIL PROTECTED]   2007-06-15 15:00:20 
Re: cgi-bin will not execute perl program
drummike@[EMAIL PROTECTED  2007-06-14 16:20:55 
Re: cgi-bin will not execute perl program
lysterfieldcc@[EMAIL PROT  2007-06-20 20:43:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 6:20:32 CDT 2008.