CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Need help getting error after moving module 8pm file

 



nramya82
Novice

Oct 31, 2013, 11:59 AM

Post #1 of 3 (464 views)
Need help getting error after moving module 8pm file Can't Post

Hi ,
I recently moved pm module file to save user home directory so thats safe but my cgi script stopped working the moment i changed my module
my cgi script reside under
/data/httpd/local-apache2-/cgibin/IP/ip.cgi
/data/httpd/local-apache2/cgibin /IP/ip.pm -- I moved this file
to /home/user/ip/ip.pm
I changed cgi script to point the new location of the pm file
use /home/user/ip/ip.pm file in the script and tried to run the script
I get below error.
Can't locate IP.pm in @INC (@INC contains: /data/httpd/local-apache2/cgi-bin/IP /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site/sun4-solaris /usr/local/lib/perl5/site .) at Ip.cgi line 5
Can some one please help?


FishMonger
Veteran / Moderator

Oct 31, 2013, 12:27 PM

Post #2 of 3 (462 views)
Re: [nramya82] Need help getting error after moving module 8pm file [In reply to] Can't Post

First use a 'use lib' statement to point to the new directory location, then after that use the normal 'use ip;' statement


Code
use lib '/home/user/IP'; 
use ip;


or

Code
use lib '/home/user'; 
use IP::ip;


Make sure that the web server user account has rights to access the module.


nramya82
Novice

Oct 31, 2013, 1:23 PM

Post #3 of 3 (456 views)
Re: [FishMonger] Need help getting error after moving module 8pm file [In reply to] Can't Post

Thank you so much !!. It worked

In Reply To

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives