Strange "Can't locate Module.pm in @INC" error after chaning from 'use lib' to PERL5LIB

Dear list

It's very strange:

My apache doesn't start with

[error] Can't locate SMF/Config.pm in @INC (@INC contains: /opt/smf/lib [...]) 
at /opt/smf/apconf/backend/httpd_startup_smf.pl line 228.

But why? The file is there:

# ls /opt/smf/lib/SMF/Config.pm
/opt/smf/lib/SMF/Config.pm

and the path is obviously in @INC. 

The error appears after replacing      use lib '/opt/smf/lib';
in the httpd_startup.pl with      PERL5LIB="/opt/smf/lib"
in the init.d script. Before, everything went well, and I changed nothing 
else. 

I checked permissions, copied&pasted around to avoid typos, tried to find 
someting with strace, etc., but to no avail.

Could anybody please give me a hint what could be the reason? It must be 
something very stupid, but I can't see it. 


Thanks a lot!

Hans
0
security
2/14/2006 6:08:05 PM
perl.beginners 29388 articles. 4 followers. Follow

3 Replies
926 Views

Similar Articles

[PageSpeed] 0

Hans Meier (John Doe) am Dienstag, 14. Februar 2006 19.08:

> It's very strange:
>
> My apache doesn't start with
>
> [error] Can't locate SMF/Config.pm in @INC (@INC contains: /opt/smf/lib
> [...]) at /opt/smf/apconf/backend/httpd_startup_smf.pl line 228.
>
> But why? The file is there:
>
> # ls /opt/smf/lib/SMF/Config.pm
> /opt/smf/lib/SMF/Config.pm
>
> and the path is obviously in @INC.
>
> The error appears after replacing      use lib '/opt/smf/lib';
> in the httpd_startup.pl with      PERL5LIB="/opt/smf/lib"
> in the init.d script. Before, everything went well, and I changed nothing
> else.
[...]

Ok, finally a 

<Perl>
   use lib qw(/opt/smf/lib);
</Perl>

in the httpd.conf did the trick, while a PerlSetEnv PERL5LIB also didn't.

I'm fine with that, but still don't understand how a path present in @INC is 
ignored.

Hans
0
security
2/14/2006 8:24:24 PM
On 2/14/06, Hans Meier (John Doe) <security.department@tele2.ch> wrote:

> I'm fine with that, but still don't understand how a path present in @INC=
 is
> ignored.

It sure looks like it's in @INC, from the message. (You may know that
PERL5LIB is sometimes ignored for security reasons, but it's not
ignored if it's in the message.) Could there be a hidden (control or
whitespace) character or something else in there? See whether you can
compare the @INC that works with the one that doesn't, because that
sounds like the culprit. Good luck!

--Tom Phoenix
Stonehenge Perl Training
0
rootbeer
2/15/2006 12:59:08 AM
Tom Phoenix am Mittwoch, 15. Februar 2006 01.59:
> On 2/14/06, Hans Meier (John Doe) <security.department@tele2.ch> wrote:
> > I'm fine with that, but still don't understand how a path present in @INC
> > is ignored.
>
> It sure looks like it's in @INC, from the message. (You may know that
> PERL5LIB is sometimes ignored for security reasons, but it's not
> ignored if it's in the message.)

Thanks a lot for your answer, Tom, very appreciated!

I must admit that my example was oversimplified: I tried to include 3 paths.

Any form (no, '-, "-quoting, space-, :- ;-separators) of PerlSetEnv in the 
httpd.conf was ignored,...

> Could there be a hidden (control or 
> whitespace) character or something else in there? See whether you can
> compare the @INC that works with the one that doesn't, because that
> sounds like the culprit. Good luck!

....and the solution is

export PERL5LIB=/opt/osf/lib:/opt/smf/lib:/opt/my_perl/lib
(not, single or double quoted)

in the environment. I think i missed the :-variant when I tried first. How 
stupid :-(

Thanks again for driving me to the solution!

Hans
0
security
2/15/2006 8:07:42 AM
Reply:

Similar Artilces:

bugzilla: undef error
I'm encountering the problem described here: https://bugzilla.mozilla.org/show_bug.cgi?id=300448 I'm running bugzilla 2.18.3 on fedora. The problem seems to be that a line was added to this file: template/en/default/bug/create/created.html.tmpl So I commented out this line: mailrecipients = item.mailrecipients and restarted everything, but I'm still getting the same error. I'm not sure that I understand the solution very well. Any ideas? Thanks, Bryan ...

I'm getting an error using NavigateURL ='<%# Eval("Url") %>', it works when using NavigateURL="intro.aspx"
I'm getting an error using NavigateURL ='<%# Eval("Url") %>', it works when I use NavigateURL="intro.aspx" Server Error in '/orthoassist' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. Requested URL: /orthoassist/intro.aspx <asp:HyperLink runat="server" ID="hl1" Text=...

MSQuery "Column 'id' can't be used in the criteria" problem
Has anyone else seen this? ASE 15.x Any ODBC driver - tried Sybase 15.0.0.152, Sybase 12.5, even an old merant driver, all same behavior... Use MS Excel data->Get External Data->New Database Query Choose an ASE 15 datasource, any database, use the query Wizard. Select sysobjects.id, sysobjects.name, sysobjects.type filter id "is less than" 10 Retrieve the rows: MS Query complains "Column 'id' can't be used in the criteria Then completes the query successfully, except now the query cannot be edited, and lots of result processing stuff is disabl...

I can't get around the error: "Prefix 'xmlns' is not defined."
I have an xslt file which can be called 2 ways;1) the user clicked on excel download2) the user clicked on html downloadI can get the html download working, but not excel download.When I try to add in the code I want, neither work and I get the same error:"Prefix 'xmlns' is not defined."This is the code: <html><xsl:choose>    <xsl:when test="$reportType = 'HTML'">        <xsl:call-template name="HTMLStyle"/>    </xsl:when>    <xsl:o...

Error:Can't locate object method "prepare" via package "abc" at xyz.pm
Hi , Urgent help. I have written 2 modules one abc.pm & xyz.pm (admin modules). abc.pm -------------------------------------- my $databasehandle; sub new($){ my ($self,$usr,$pwd) = @_; $usr||= "test"; $pwd ||= "test123"; ($self) = {}; bless($self); $databasehandle = DBI->connect("DBI:Pg:dbname=mydb",$usr,$pwd, {PrintError =>1}); if (!$databasehandle){ print "Database connection is not estabilished"; exit; } return...

"chdir 't' if -d 't'" is evil?
Hi, I'm working on a release of PathTools, including File::Spec and Cwd. I've been told (though I never quite grokked it) to put the following code in the test scripts: BEGIN { chdir 't' if -d 't'; if ($ENV{PERL_CORE}) { @INC = '../lib'; } } use Cwd; However, I've just realized that this messes up @INC, because the Cwd.pm we need to test is in blib/lib/, which is added to the path by -Mblib, but it won't be found if we chdir('t'). I would really like to remove that whole block and make Tes...

Can't get away from: "Could not open in Design View. Quote values differently inside a '<% ... "value" ... %>' block."
I keep getting this error message when I try to switch to design view. This is the code that is causing it. OnClick="javascript:void(0);ToggleRowDisplay(this,'row<%# DataBinder.Eval(Container.DataItem, "Equipment_ID") %>');" When I take out this section I can go into design view without a problem. Any ideas?? is the word row has to be there?mess with the best...die like the rest...

Strange error: "'System.Web.UI.Controls' doesn't contain any public member..."
I get the following warnings when I Build my AJAX enabled (including web extensions) web site: Namespace or type specified in the Imports 'System.Web.UI.Controls' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. I'm not sure where to start looking - can someone point me in the right direction? I do have the following in my web.config: ... <configuration> <system.web> <pages styleSheetThem...

[Software Error] Can't locate object method "new" via package "Bugzilla::Template" at Bugzilla/Template.pm line 977
Hi, Yesterday I downloaded latest stable version (4.2.1) of bugzilla and I resolved all dependencies even checksetup.pl also run successfully I also checked testagent.cgi which also show OK. but when I use index.cgi, It is showing error which is in subject line. I searched in google and found one suggestion "may be code corrupted" but I downloaded again and did md5sum on file, every thing looks as expected. Can someone please tell me why that behaviour I am getting. Thanks and Regards, Praveen Kumar http://fedoraproject.org/wiki/User:Kumarpraveen http://fedoraproje...

Give access to non virtual folder through configuration entry? ERROR: <location> path attribute must be a relative virtual path. It cannot contain any of '?' ':' '\' '*' '"' '<' '>' or '|'.
I have a webpage running under a virtual directory that is mapped to d:/webapplication that produces an excel spreadsheet, the page calls a library object that generates a report and places it in a folder d:/attachments. This folder is not in the virtual directory. When I access the webpage i click a button and it attemps to return the created spreadsheet as a mim content type application/vnd.ms-excel. However i getting redirected back to the login page of the application. Ive also noticed that the excel spreadsheet has not even been created at this location. So assuming this...

Error
Hi  I have not worked in ASP.NET for quite a few months now... and it really shows. Desinging new simple site - nicked some of my old code. I think I must have totally forgotten a few crucial bits here and there. Code below:<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/change_master.master" MaintainScrollPositionOnPostBack ="true" %> <asp:Content ID="mycontent" ContentPlaceHolderID="master_placeholder" Runat="Server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </asp:Content>  Imports system.Diag...

Can't locate object method "loop_ignore_signal" via package "POE::Kernel" at /usr/lib/perl5/site_perl/5.8.8/POE/Resource/Signals.pm line 138.
--_dc38ad10-c552-40c3-a7de-80f8d1ecea2a_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable When trying to use POE::Loop::Event or POE::Loop::IO_Poll I get the error: Can't locate object method "loop_ignore_signal" via package "POE::Kernel" a= t /usr/lib/perl5/site_perl/5.8.8/POE/Resource/Signals.pm line 138. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/POE/Loo= p/PerlSignals.pm line 19. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/POE/Loop/IO= _Poll.pm line ...

Getting Error Message "Can't load 'C:/Perl64/lib/auto/DBD/Oracle/Oracle.dll" While Connecting to Oracle
--755704646-1080936359-1390695547=:84331 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I am trying to configure an Oracle connection from Perl running on a Window= s 7 desktop to an Oracle 11g database running on Linux; however the databas= e connection step is failing.=0A=0AThe following line of perl code fails:= =0A=0A=A0 =A0use DBD::Oracle;=0A=0ABelow is the full error message:=0A=0ACa= n't load 'C:/Perl64/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle:= load_file:%1 is not a valid Win32 application at C:/Perl64/lib/D...

Modify("col_name.initial='A'") can't work
hi all, need some help, the HTMLDW modify method doesn't change my column initial value... what wrong ? thanks Hi, That should work fine... Can you tell me where did you call this modify function? Is it after setting the dataobject or before setting the dataobject? - Srinivasan Boosi JDuke <jduke@mymailbag.com> wrote in message news:39AC7766.2E427B63@mymailbag.com... > hi all, > > need some help, the HTMLDW modify method doesn't change my column > initial > value... what wrong ? > > thanks > ...

Web resources about - Strange "Can't locate Module.pm in @INC" error after chaning from 'use lib' to PERL5LIB - perl.beginners

Resources last updated: 12/6/2015 11:08:22 PM