Howto locate locally installed Perl module for a CGI script in APACHE .htaccess


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Howto locate locally installed Perl module for a CGI script in APACHE .htaccess
# 1  
Old 05-18-2006
Howto locate locally installed Perl module for a CGI script in APACHE .htaccess

Hi,

I have the following simple CGI script, just containg header:

Code:
#!/usr/bin/perl -w 
use CGI ':standard'; 
use lib "/home/myname/lib/perl5/site_perl/5.8.5/"; 
use Mail::Sendmail;

I also have included this directive in ~/public_html/.htaccess :

Code:
SetEnv PERL5LIB /home/myname/lib/perl5/site_perl/5.8.5

Since I am not a root user I have installed my module locally
as shown in the directive above.


Now the problem is that my script above (called temp.cgi)
cannot recognize the location of my Perl module.
You can try it here:


http://defiant.i2r.a-star.edu.sg/~ew...i-bin/temp.cgi


Also in command line: $perl -cT temp.cgi
gave same problem of failure in recognizing Mail::Sendmail.


What's wrong with my setup? How can I let my cgi script
recognize the Mail::Sendmail module?


Hope to hear from you again.


Regards,
monkfan
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

2. Red Hat

modprobe: Can't locate module usbcore

Hello Linux forum! I am working on an older Red hat Linux version(kernel) 2.4.21 and I have compiled the kernel and I select it on startup, but I get the following errors: Mounting Local Filesystems: Modprobe: modprobe: Can't locate module usbcore modprobe: modprobe: Can't locate module udf... (1 Reply)
Discussion started by: mr.rhtuner
1 Replies

3. Web Development

problem with exporting vairable from one perl cgi to another perl cgi script while redirecting.

Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect. Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is redirected to welcome page. My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

4. Shell Programming and Scripting

Can't locate inc/Module/Install.pm in @INC

Hi, I'm trying to install "Date-FromToday" module on my solaris box as below. #perl Makefile.pl (i got the below error) Can't locate inc/Module/Install.pm in @INC (@INC contains: /usr/perl5/5.8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int... (3 Replies)
Discussion started by: admin@2010
3 Replies

5. UNIX for Advanced & Expert Users

Apache module & perl problem

I have a very strange problem that I can't seem to solve. I have apache module which filters content and within that module I will add some more content based on this calls: int check; check = system("/usr/bin/check"); check is a perl-script that exits with value 1 if the file doesn't... (2 Replies)
Discussion started by: hjalle
2 Replies

6. Shell Programming and Scripting

favicon in Perl CGI module

Hi, I'm writing a CGI script in Perl using the CGI module (CGI - perldoc.perl.org), and I can't find the exact syntax to add a reference to my favicon .ico file in the <head>. Any insights? Thanks. (4 Replies)
Discussion started by: Rledley
4 Replies

7. Linux

Cant locate CGI/Cookie.pm

hi frnds i m getting this error whenever i m trying to run otrs in my web browser. http://ipaddr /otrs/index.pl " 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your... (1 Reply)
Discussion started by: naik_mit
1 Replies

8. UNIX for Dummies Questions & Answers

Help With CGI Scripts and .htaccess

Hi everyone, I need help with writing a script that does the following: a client/user goes onto my website, hits a link, it would pop up either 1. user name and password 2. password and directory name and then after they enter the required info, it would take them to their own folder. So... (6 Replies)
Discussion started by: crazycelicagts
6 Replies

9. UNIX for Dummies Questions & Answers

Apache Perl/CGI

Can any body help me with apache and cgi i'dont know how iconfigure apache to use cgi... and when i try to start apachectl it says there is no file... please help me...i have apache installed... (1 Reply)
Discussion started by: CreamHarry
1 Replies

10. UNIX for Dummies Questions & Answers

Calling privately installed module from script help please

hello, i need help calling a privately installed module from a script. my server admin installed perl with the standard modules and simply no extras, including the LWP::Simple mod i need. (side note: ive asked for it to be installed). in the meantime, i installed it (libwww-perl-5.62.tar.gz)... (2 Replies)
Discussion started by: sdiva
2 Replies
Login or Register to Ask a Question