Computing.Net > Forums > Linux > perl script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

perl script

Reply to Message Icon

Name: DAS
Date: October 7, 2003 at 11:25:30 Pacific
OS: MDK9.1
CPU/Ram: na
Comment:

Hi,

I was hoping someone could help me with this. I have a mdk server setup with apache 2 and no mod_perl. I am trying to serve cgi-scripts and its not working propperly. The site that I am trying to setup the cgi-bin and access for is a virtual server.

I have the following in my apache config files (in various places):

#Begin
#"domain" has been substituted for the real #domain name. "user" has been subbed for #the real user account name


AddHandler cgi-script .cgi
#...
<Directory /home/user/cgi-bin>
Options ExecCGI Indexes
Order allow,deny
Allow from all
</Directory>
#...
NameVirtualHost 192.168.0.2
#...
<VirtualHost 192.168.0.2>
DocumentRoot /home/user/public_html
ServerAdmin webmaster@domain.com
ServerName domainname.com
ServerAlias www.domainame.com
ScriptAlias /cgi-bin/ /home/user/cgi-bin/
</VirtualHost>

#End

When i try to run the scripts, it just lets me download them. When I try to run the scripts manually (ex. "./scriptname.cgi") from the command line it says that i have a bad interpreter. When I run "perl scriptname.cgi" it works fine. I have checked the first line of the script and it points to what the system says is the perl interpreter ("#!/usr/bin/perl"). It all seems to add up, but it doesn't work. My thinking is that apache is having the same problem dealing with an interpreter, but since its specified at the begining of the file, i dont know what else i can do?

Any help would be greatly appreciated. Thank you



Sponsored Link
Ads by Google

Response Number 1
Name: nelfer
Date: October 7, 2003 at 16:54:16 Pacific
Reply:

are you sure perl is in that location?
Type

which perl

to verify.
Also make sure the scripts are executable (have the executable bit on)

chmod a+x script.cgi


0

Response Number 2
Name: DAS
Date: October 8, 2003 at 05:00:36 Pacific
Reply:

I am positive that it is in the right place and that the perl scripts point to it. The directory and its files all have perissions of 755. Any other ideas? Thanks


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


FreeBSD Books postgres crash



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: perl script

perl scripts for filtering mail www.computing.net/answers/linux/perl-scripts-for-filtering-mail/13380.html

Perl script is not executing www.computing.net/answers/linux/perl-script-is-not-executing-/20036.html

Can I use awk in a perl script? www.computing.net/answers/linux/can-i-use-awk-in-a-perl-script/26934.html