473,395 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Perl and Apache

3
I have a perl script that runs perfectly when i run from the command prompt.
When I execute via apache2 it does NOT run because it cannot locate region.pm which i need for the script. region.pm is in the same folder as the script.
when i remove it it works.
It also works when i include "use lib 'script_folder';" !

I believe it has to do with apache and paths.
The apache error log gives message "Can't locate region.pm in @INC".
I have added the path to @INC but still doesn't work!

Any Ideas?????
Oct 23 '08 #1
6 1517
numberwhun
3,509 Expert Mod 2GB
Do you add the directory where the script is located into your @INC?

@INC contains the list of directories where Perl will look for installed modules. If you have your own, then you are going to have to add, in your script, the directory where your perl module is being kept.

Here is a link that shows you what I am talking about.

Regards,

Jeff
Oct 23 '08 #2
rois
3
Thanks Jef

/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-m ulti /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/li b/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-mul ti /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendo r_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/p erl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_pe rl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /data1/flystaydrive/rois

here are paths in @INC and the last one /data1/flystaydrive/rois is the path where both the perl script and region.pm are located
Oct 24 '08 #3
numberwhun
3,509 Expert Mod 2GB
If it is in the @INC path, then you need to make sure that other factors, like permissions on that directory or the modules are not keeping you from accessing them.

Regards,

Jeff
Oct 24 '08 #4
KevinADC
4,059 Expert 2GB
see post below
Oct 24 '08 #5
KevinADC
4,059 Expert 2GB
I think the problem is that the "lib" folder is outside of the apache folder. Not sure if Apache will include a folder from just anywhere on the hard drive. Move the folder and the script into the apache folder and retry.
Oct 24 '08 #6
rois
3
I think the problem is that the "lib" folder is outside of the apache folder. Not sure if Apache will include a folder from just anywhere on the hard drive. Move the folder and the script into the apache folder and retry.
I believe that the problem lies with apache and not perl! I have another linux server and I have tried it and it works as it is! I will try and reinstall apache.
Oct 30 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike Bobbitt | last post by:
I've recently decided to switch from compiled Apache/PHP to RPM's of both and I'm having a problem I can't seem to solve. I have a Perl script called php_include.cgi that parses a PHP file for...
4
by: Keith | last post by:
All: What is the difference between Perl (CGI) and PHP (Apache module)? I thought both used servers to direct the user to the appropiate Perl or PHP program in order to execute the program to...
0
by: Thomas | last post by:
hi, i have different perl versions installed on my computer (Linux) and like to tell my webserver apache, that he can also upgrade/use from perl v. 5.6 to Perl v. 5.8...i'm sorry i can't find...
3
by: Tommo | last post by:
Hello All, I am a still learning so be easy on me. I am trying to get some code to work that is using JS and Perl/CGI, I am using AS Perl and an Apache Server on XP as the webserver. Can anyone...
29
by: Mainlander | last post by:
An ISP I belong to uses Majordomo for their mailing list system. I'd like to encourage them to move to a system that uses a database, preferably psql which they already run on their server....
6
by: Michael L. Artz | last post by:
I'm having some odd issues, but I'm not sure exactly the cause of them, but postgres is the component in the system that is throwing the errors, so I thought I'd start here. I have built a web...
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
1
by: graphman | last post by:
I have a perl script that I'm calling using php's shell_exec that uses an expect module to go to another system to pull tiff files. The php perl combination works great when I launch from the...
31
by: happyse27 | last post by:
Hi All, I am doing a connection to database from perl to mysql via apache. Apache is configured correctly. Mysql username is root and password is mysql1, and database name is test. ...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.