LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 02-25-2010, 07:47 AM   #1
JGuillou
LQ Newbie
 
Registered: Aug 2008
Location: Mauritius
Distribution: Various Ubuntu
Posts: 12

Rep: Reputation: 0
Cgi (Perl) scripts will not run on OpenSuse11.1 - trying to use an ERP in Mozilla


I have installed as a test the ERP on my Laptop (Mandriva 2009) and can access ERP via Mozilla correctly.

Have installed ERP on server (OenSuse11.1) and can connect to ERP via Mozilla

I can access the server from my laptop via LAN and works OK

Problem starts when I install on a second laptop - the perl scripts do not run but I am propmted to download the file (happens in both Mandriva and Win XP)

For the ERP my scripts reside in /var/erp (Directory is owned by wwwrun, group www, with permissions 755

.pl scripts are owned by root, group root, permission 775

In httpd/conf.d I have an erp.conf file which contains the following :

Alias /erp /var/erp/
<Directory /var/erp>
AllowOverride All
AddHandler cgi-script .pl
Options ExecCGI Includes FollowSymlinks
Order Allow,Deny
Allow from All
</Directory>

<Directory /var/erp/users>
Order Deny,Allow
Deny from All
</Directory>

Any help - Why will it work locally on the server, via LAN from my laptop but not for any other client?
 
Old 02-25-2010, 08:36 AM   #2
SethsdadtheLinuxer
Member
 
Registered: Jun 2007
Posts: 152

Rep: Reputation: 37
could be your perl path (#/usr/local/bin/perl)
a common problem is perl being in /usr/local/bin/perl and the *.pl script looking for /usr/bin/perl

This runs fine from a command prompt, but apache has to be able to find the exact path because it doesn't have full shell permissions.
 
Old 02-25-2010, 08:49 AM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
On the laptop that is having trouble, are the scripts that don't run on the laptop or on the server ?

If the server works, it works.

try running
Code:
which perl
and see if the first line of the scripts on the laptop agree with that.

Last edited by smoker; 02-25-2010 at 08:52 AM.
 
Old 02-25-2010, 10:20 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try the ScriptAlias option http://httpd.apache.org/docs/2.2/mod...ml#scriptalias
Quote:
It is safer to avoid placing CGI scripts under the DocumentRoot in order to avoid accidentally revealing their source code if the configuration is ever changed. The ScriptAlias makes this easy by mapping a URL and designating CGI scripts at the same time.
 
  


Reply



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
How to run perl scripts outside cgi-bin? xpucto Linux - Server 3 04-20-2007 02:23 AM
How can I run a perl and cgi scripts in my apache.?. ethnicme Programming 6 07-21-2006 04:02 AM
Disabling Perl/CGI Scripts totally renegadeavenger Linux - General 1 08-14-2005 07:28 PM
Of Perl CGI scripts and Sendmail Chrax Programming 2 06-06-2005 04:21 PM
Running Perl/CGI scripts hso_sof Linux - Newbie 3 08-22-2003 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration