LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-12-2007, 10:07 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
How to run perl scripts outside cgi-bin?


Hi!
I would like to run perl scripts outside my cgi-bin (if you ask why, have a look at my other thread).
so I put my scripts under
Quote:
/var/www/wikicalc
in httpd.conf I added:
Quote:
Alias /wikicalc /var/www/wikicalc

<Directory /var/www/wikicakc*>
<IfModule mod_perl.c>
<Files *.pl> # requires mod_perl
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders
Options -Indexes +ExecCGI
</Files>
</IfModule>
Options +ExecCGI
AddHandler cgi-script .pl
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "now plus 0 seconds"
</IfModule>
</Directory>
and
Quote:
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi
but it doesnt work. I try to run the perl script, the browser just shows me the code but doent run it. What did I forget?
 
Old 04-12-2007, 10:57 AM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
If you cut and pasted this from your conf file, then at least one problem is that you have wikicakc instead of wicicalc in your Directory definition.
 
Old 04-18-2007, 04:04 AM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by forrestt
If you cut and pasted this from your conf file, then at least one problem is that you have wikicakc instead of wicicalc in your Directory definition.
thanks. I corrected it. now its being compiled and I getting an Internal Server Error. I looked in error_logs and found this:
Quote:
[Wed Apr 18 10:23:17 2007] [error] Can't locate WKC.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /var/www/wikicalc/wikicalccgi.pl line 23.\nBEGIN failed--compilation aborted at /var/www/wikicalc/wikicalccgi.pl line 23.\n
I do not understand what is the problem because, WKC.pm is in /var/www/wikicalc, so it should be found without problem. do I have to configure something in the perl environment?
 
Old 04-20-2007, 02:23 AM   #4
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Im still looking around and Im very surprised to have difficulty finding an answer to my problem. Does really have noone any advice?
 
  


Reply


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
How can I run a perl and cgi scripts in my apache.?. ethnicme Programming 6 07-21-2006 04:02 AM
Where do I put my cgi-bin scripts? BrianK Linux - Software 2 10-12-2005 10:59 PM
Running perl scripts outside of cgi-bin ylikone Programming 1 09-08-2005 04:34 AM
Of Perl CGI scripts and Sendmail Chrax Programming 2 06-06-2005 04:21 PM
.CGI scripts enabled with #!/usr/bin/perl -i?? computerdaves Fedora 8 02-18-2005 04:03 PM

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

All times are GMT -5. The time now is 05:09 AM.

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