LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-15-2007, 11:28 PM   #1
emil2k
LQ Newbie
 
Registered: Dec 2007
Posts: 4

Rep: Reputation: 0
Lightbulb Perl Files Downloading Instead of Running


I have set up a development machine at home and I'm trying to move perl files that I know work from my HostGator account to my home account, but when I placed the files and proceded with the installation and matched the same permissions as on my previous host, for some reason when I try to view the perl file via browser it tries to download it instead of running it.

This is what I have in my httpd.conf and this is a Debian Etch with Apache2

Code:
ScriptAlias /cgi-bin/ /var/www/project/trunk/cgi-bin/
<Directory /var/www/project/trunk/cgi-bin>
        AllowOverride None
        Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
</Directory>
Can somebody tell me what I should do

Last edited by emil2k; 12-15-2007 at 11:29 PM.
 
Old 12-16-2007, 04:48 PM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,415

Rep: Reputation: 99
welcome!
a quick guess: +ExecCGI

maybe you have to specify a handler with

AddHandler cgi-script .cgi .pl
in httpd.conf then restart the server

(to explain the server which file extensions should be processed by the parser)

Last edited by j-ray; 12-16-2007 at 04:50 PM.
 
Old 12-16-2007, 06:33 PM   #3
emil2k
LQ Newbie
 
Registered: Dec 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by j-ray View Post
welcome!
a quick guess: +ExecCGI

maybe you have to specify a handler with

AddHandler cgi-script .cgi .pl
in httpd.conf then restart the server

(to explain the server which file extensions should be processed by the parser)
Tried both is still downloading instead of running.

On my hostgator account I actually had a perl file with out an extension that would be executed as perl, is the AddHandler part going to detour that?

Last edited by emil2k; 12-16-2007 at 06:34 PM.
 
Old 12-17-2007, 03:44 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,415

Rep: Reputation: 99
another guess is
ScriptAlias /cgi-bin/ "/var/www/project/trunk/cgi-bin/"
<Directory "/var/www/project/trunk/cgi-bin">

maybe the quotes are necessary not only recommended? i'm not sure but could possibly be the reason...
 
Old 12-17-2007, 12:22 PM   #5
emil2k
LQ Newbie
 
Registered: Dec 2007
Posts: 4

Original Poster
Rep: Reputation: 0
I got it all fixed figures that I just needed to install some modules the file was downloading instead of displaying a 500 error, I checked the apache2 logs and it was displaying the error that it was not finding the modules after I got the modules it ran.
 
  


Reply

Tags
cgi, perl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
while downloading html files it becomes mp3 files tam Linux - Newbie 3 08-28-2007 03:33 AM
Perl programs downloading as binary via cgi/apache? jon_k Linux - Software 1 02-22-2007 05:28 AM
Downloading a file from Url in perl bratieres Programming 2 03-01-2006 12:49 AM
perl files download instead of parsed on apache2 mod-perl2 not parsing perl files zeigerpuppy Debian 1 02-16-2006 05:31 AM
Problem running perl files fuelinjection Linux - General 2 01-19-2004 11:15 PM


All times are GMT -5. The time now is 02:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration