You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ray Chuan <rc...@hotmail.com> on 2004/11/29 02:47:54 UTC

[error] Can't locate object method "bootstrap" via package "DBI"

Hi,
I have DBI 1.45, Apache 2.052 Win32, mod_perl 1.99_17, Perl 5.84. I get that 
error when working with DBI in the /perl dir of apache. works fine on 
cmd-line and cgi-bin.

Any comments are highly appreciated.
---------
#error.log
[error] Can't locate object method "bootstrap" via package "DBI" at 
F:/Net/Perl/site/lib/DBI.pm line 249.
BEGIN failed--compilation aborted at F:/Net/Perl/site/lib/DBI.pm line 256.
Compilation failed in require at (eval 7) line 8.
BEGIN failed--compilation aborted at (eval 7) line 8.
---------
#!F:/Net/Perl/bin/Perl.exe
##
##  Perl eg
use strict;
use DBI;

my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p", 
{PrintError=>0,RaiseError=>1});
$dbh->disconnect();

_________________________________________________________________
Get cheap fares online with MSN Travel http://www.msn.com.sg/travel/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.
perl -V:
===
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef use5005threads=undef useithreads=define 
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 
-D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT  -DNO_HASH_SEED 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO 
-DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf  
-libpath:"F:\Net\Perl\lib\CORE"  -machine:x86'
    libpth=C:\PROGRA~1\MICROS~3\VC98\lib
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib 
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib 
msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib 
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib 
msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
    gnulibc_version='undef'
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug 
-opt:ref,icf  -libpath:"F:\Net\Perl\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
  Locally applied patches:
  	ActivePerl Build 810
  	22751 Update to Test.pm 1.25
  	21540 Fix backward-compatibility issues in if.pm
  Built under MSWin32
  Compiled at Jun  1 2004 11:52:21
  @INC:
    F:/Net/Perl/lib
    F:/Net/Perl/site/lib
    .


>From: Stas Bekman <st...@stason.org>
>To: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
>CC: Ray Chuan <rc...@hotmail.com>, modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Thu, 02 Dec 2004 10:32:05 -0500
>
>Please show us your perl config:
>
>  Perl.exe -V
>
>It's possible that for some reason the location of XS modules is not found.
>
>--
>__________________________________________________________________
>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
>http://stason.org/     mod_perl Guide ---> http://perl.apache.org
>mailto:stas@stason.org http://use.perl.org http://apacheweek.com
>http://modperlbook.org http://apache.org   http://ticketmaster.com
>
>--
>Report problems: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
>List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>

_________________________________________________________________
Fast. Clear. Easy. The new face of MSN Search. http://search.msn.com.sg/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Stas Bekman <st...@stason.org>.
Please show us your perl config:

  Perl.exe -V

It's possible that for some reason the location of XS modules is not found.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.
For the sake of completion, the problem was solved by checking the option in 
Properties->Logon "Allow service to interact with Desktop

>From: "Ray Chuan" <rc...@hotmail.com>
>To: randy@theoryx5.uwinnipeg.ca
>CC: modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Fri, 03 Dec 2004 09:31:30 +0800
>
>Thanks for all the help. Apparently, I changed the Apache's service logon 
>settings, and it now works.
>

_________________________________________________________________
Find love on MSN Personals http://personals.msn.com.sg/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.
Thanks for all the help. Apparently, I changed the Apache's service logon 
settings, and it now works.

>From: "Ray Chuan" <rc...@hotmail.com>
>To: randy@theoryx5.uwinnipeg.ca
>CC: modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Fri, 03 Dec 2004 09:28:43 +0800
>
>yes, it worked...great, first time smth with DBI worked.
>
>Apache, MySQL and Perl all sit in the same dir, and drive.
>
>>From: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
>>To: Ray Chuan <rc...@hotmail.com>
>>CC: modperl@perl.apache.org
>>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>>"DBI"
>>Date: Thu, 2 Dec 2004 09:21:05 -0600 (CST)
>>
>>On Thu, 2 Dec 2004, Ray Chuan wrote:
>>
>> > >- can you use, for example, DBI, in a simple mod_perl
>> > >handler?
>> >
>> > no, even a bare script which invokes connect than
>> > disconnect fails, as with the first post:
>> > ===
>> > #!F:/Net/Perl/bin/Perl.exe
>> > ##
>> > ## Perl eg
>> > use strict;
>> > use DBI;
>> >
>> > my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p",
>> > {PrintError=>0,RaiseError=>1});
>> > $dbh->disconnect();
>> > ===
>>
>>Sorry I wasn't clear - I meant to try this in a handler
>>other then ModPerl::Registry, something like:
>>=====================================================
>># file Apache/Hello.pm
>>package Apache::Hello;
>>use strict;
>>use Apache::RequestRec ();  # for $r->content_type
>>use Apache::RequestIO ();   # for $r->print
>>use Apache::Const -compile => ':common';
>>use DBI;
>>
>>sub handler {
>>    my $r = shift;
>>    my $dbh = DBI->connect("DBI:mysql:webdb;localhost",
>>        "foo", "p", {PrintError=>0,RaiseError=>1});
>>    $dbh->disconnect();
>>    my $time = scalar localtime();
>>    my $package = __PACKAGE__;
>>    $r->content_type('text/html');
>>    $r->print(<<"END");
>><HTML><BODY>
>><H3>Hello</H3>
>>Hello from <B>$package</B>! The time is $time.
>></BODY></HTML>
>>END
>>    return Apache::OK;
>>}
>>
>>1;
>>===========================================================
>>saved in F:\Net\Perl\site\lib\Apache2\Apache\Hello.pm,
>>and then invoked in your httpd.conf as
>>===========================================================
>>PerlModule Apache::Hello
>><Location /hello>
>>    SetHandler perl-script
>>    PerlResponseHandler Apache::Hello
>></Location>
>>==========================================================
>>and accessed as http://localhost/hello.
>>
>>One other thing - is your Apache installation also on
>>the F drive? If not, and if possible, can you try an
>>Apache on F to see if that works (or try moving Perl
>>to the drive Apache is on)?
>>
>>--
>>best regards,
>>randy
>>
>>--
>>Report problems: http://perl.apache.org/bugs/
>>Mail list info: http://perl.apache.org/maillist/modperl.html
>>List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>>
>
>_________________________________________________________________
>Find it on the web with MSN Search. http://search.msn.com.sg/
>
>
>--
>Report problems: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
>List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>

_________________________________________________________________
Find love on MSN Personals http://personals.msn.com.sg/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.
yes, it worked...great, first time smth with DBI worked.

Apache, MySQL and Perl all sit in the same dir, and drive.

>From: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
>To: Ray Chuan <rc...@hotmail.com>
>CC: modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Thu, 2 Dec 2004 09:21:05 -0600 (CST)
>
>On Thu, 2 Dec 2004, Ray Chuan wrote:
>
> > >- can you use, for example, DBI, in a simple mod_perl
> > >handler?
> >
> > no, even a bare script which invokes connect than
> > disconnect fails, as with the first post:
> > ===
> > #!F:/Net/Perl/bin/Perl.exe
> > ##
> > ## Perl eg
> > use strict;
> > use DBI;
> >
> > my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p",
> > {PrintError=>0,RaiseError=>1});
> > $dbh->disconnect();
> > ===
>
>Sorry I wasn't clear - I meant to try this in a handler
>other then ModPerl::Registry, something like:
>=====================================================
># file Apache/Hello.pm
>package Apache::Hello;
>use strict;
>use Apache::RequestRec ();  # for $r->content_type
>use Apache::RequestIO ();   # for $r->print
>use Apache::Const -compile => ':common';
>use DBI;
>
>sub handler {
>    my $r = shift;
>    my $dbh = DBI->connect("DBI:mysql:webdb;localhost",
>        "foo", "p", {PrintError=>0,RaiseError=>1});
>    $dbh->disconnect();
>    my $time = scalar localtime();
>    my $package = __PACKAGE__;
>    $r->content_type('text/html');
>    $r->print(<<"END");
><HTML><BODY>
><H3>Hello</H3>
>Hello from <B>$package</B>! The time is $time.
></BODY></HTML>
>END
>    return Apache::OK;
>}
>
>1;
>===========================================================
>saved in F:\Net\Perl\site\lib\Apache2\Apache\Hello.pm,
>and then invoked in your httpd.conf as
>===========================================================
>PerlModule Apache::Hello
><Location /hello>
>    SetHandler perl-script
>    PerlResponseHandler Apache::Hello
></Location>
>==========================================================
>and accessed as http://localhost/hello.
>
>One other thing - is your Apache installation also on
>the F drive? If not, and if possible, can you try an
>Apache on F to see if that works (or try moving Perl
>to the drive Apache is on)?
>
>--
>best regards,
>randy
>
>--
>Report problems: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
>List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>

_________________________________________________________________
Find it on the web with MSN Search. http://search.msn.com.sg/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 2 Dec 2004, Ray Chuan wrote:

> >- can you use, for example, DBI, in a simple mod_perl
> >handler?
>
> no, even a bare script which invokes connect than
> disconnect fails, as with the first post:
> ===
> #!F:/Net/Perl/bin/Perl.exe
> ##
> ## Perl eg
> use strict;
> use DBI;
>
> my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p",
> {PrintError=>0,RaiseError=>1});
> $dbh->disconnect();
> ===

Sorry I wasn't clear - I meant to try this in a handler
other then ModPerl::Registry, something like:
=====================================================
# file Apache/Hello.pm
package Apache::Hello;
use strict;
use Apache::RequestRec ();  # for $r->content_type
use Apache::RequestIO ();   # for $r->print
use Apache::Const -compile => ':common';
use DBI;

sub handler {
   my $r = shift;
   my $dbh = DBI->connect("DBI:mysql:webdb;localhost",
       "foo", "p", {PrintError=>0,RaiseError=>1});
   $dbh->disconnect();
   my $time = scalar localtime();
   my $package = __PACKAGE__;
   $r->content_type('text/html');
   $r->print(<<"END");
<HTML><BODY>
<H3>Hello</H3>
Hello from <B>$package</B>! The time is $time.
</BODY></HTML>
END
   return Apache::OK;
}

1;
===========================================================
saved in F:\Net\Perl\site\lib\Apache2\Apache\Hello.pm,
and then invoked in your httpd.conf as
===========================================================
PerlModule Apache::Hello
<Location /hello>
   SetHandler perl-script
   PerlResponseHandler Apache::Hello
</Location>
==========================================================
and accessed as http://localhost/hello.

One other thing - is your Apache installation also on
the F drive? If not, and if possible, can you try an
Apache on F to see if that works (or try moving Perl
to the drive Apache is on)?

-- 
best regards,
randy

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.

>From: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
>To: Ray Chuan <rc...@hotmail.com>
>CC: modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Thu, 2 Dec 2004 01:00:46 -0600 (CST)
>
>- does your F drive have any unusual permissions that
>may be blocking (for some reason) loading of dlls?

I'm using windows xp home, and i'm running apache as admin, so there should 
be no problems, though its a security risk. I'm using apache for testing 
anyway.

>- can you use, for example, DBI, in a simple mod_perl
>handler?

no, even a bare script which invokes connect than disconnect fails, as with 
the first post:
===
#!F:/Net/Perl/bin/Perl.exe
##
## Perl eg
use strict;
use DBI;

my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p",
{PrintError=>0,RaiseError=>1});
$dbh->disconnect();
===

_________________________________________________________________
Find love on MSN Personals http://personals.msn.com.sg/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 1 Dec 2004, Ray Chuan wrote:

> yes, the printenv.pl script works fine, and the CGI module
> works fine too, although I have to create a CGI object:

That's really strange then that you can use other modules
that don't have an xs component within ModPerl::Registry,
but those that do have such a component fail. All I can
thing of at the moment is

- does your F drive have any unusual permissions that
may be blocking (for some reason) loading of dlls?

- can you use, for example, DBI, in a simple mod_perl
handler?

-- 
best regards,
randy

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.
yes, the printenv.pl script works fine, and the CGI module works fine too, 
although I have to create a CGI object:
--
my $q = new CGIl
print $q->header();
--
I can't do this:
--
print header();
--
as I'll get this error:
--
[error] Undefined subroutine 
&ModPerl::ROOT::ModPerl::Registry::F_3a_Net_Apache_20Group_Apache2_perl_test_2epl::header 
called at (eval 170) line 3.\n
--
although in startup.pl, there's use CGI();

>From: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
>To: Ray Chuan <rc...@hotmail.com>
>CC: modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Mon, 29 Nov 2004 09:43:55 -0600 (CST)
>
>On Mon, 29 Nov 2004, Ray Chuan wrote:
>[ ... ]
> > >If you don't have another Perl, do you have problems using
> > >other modules with an xs component? For example, does
> > >    use Digest::MD2;
> > >cause problems (assuming you have Digest::MD2 installed)?
> >
> > here's the script i ran:
> > --
> > #!F:/Net/Perl/bin/Perl.exe
> > print "Content-type: text/plain\n\n";
> > use strict;
> > # OO style
> > use Digest::MD2;
> > my $ctx = Digest::MD2->new;
> > my $data = "foo";
> > $ctx->add($data);
> > my $digest = $ctx->digest;
> > --
> > #error.log
> > [error] Can't locate object method "new" via package "Digest::MD2" at 
>(eval
> > 16) line 9.\n
> >
> > it works fine in cgi-bin, but it doesn't in the mod_perl dir...
>
>Strange ... I assume that a simple ModPerl::Registry script
>under the mod_perl directory that, for example, just prints
>out the environment variables (without using any other
>module) works OK? And what about using a module (eg, CGI)
>that doesn't have an xs component - does that cause any
>problems?
>
>--
>best regards,
>randy
>
>--
>Report problems: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
>List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>

_________________________________________________________________
Download MSN Messenger emoticons and display pictures. 
http://ilovemessenger.msn.com/?mkt=en-sg


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 29 Nov 2004, Ray Chuan wrote:
[ ... ]
> >If you don't have another Perl, do you have problems using
> >other modules with an xs component? For example, does
> >    use Digest::MD2;
> >cause problems (assuming you have Digest::MD2 installed)?
>
> here's the script i ran:
> --
> #!F:/Net/Perl/bin/Perl.exe
> print "Content-type: text/plain\n\n";
> use strict;
> # OO style
> use Digest::MD2;
> my $ctx = Digest::MD2->new;
> my $data = "foo";
> $ctx->add($data);
> my $digest = $ctx->digest;
> --
> #error.log
> [error] Can't locate object method "new" via package "Digest::MD2" at (eval
> 16) line 9.\n
>
> it works fine in cgi-bin, but it doesn't in the mod_perl dir...

Strange ... I assume that a simple ModPerl::Registry script
under the mod_perl directory that, for example, just prints
out the environment variables (without using any other
module) works OK? And what about using a module (eg, CGI)
that doesn't have an xs component - does that cause any
problems?

-- 
best regards,
randy

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Ray Chuan <rc...@hotmail.com>.
>From: Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
>To: Ray Chuan <rc...@hotmail.com>
>CC: modperl@perl.apache.org
>Subject: Re: [error] Can't locate object method "bootstrap" via package 
>"DBI"
>Date: Sun, 28 Nov 2004 22:02:00 -0600 (CST)
>
>On Mon, 29 Nov 2004, Ray Chuan wrote:
>
> > Hi, I have DBI 1.45, Apache 2.052 Win32, mod_perl 1.99_17,
> > Perl 5.84. I get that error when working with DBI in the
> > /perl dir of apache. works fine on cmd-line and cgi-bin.
> >
> > Any comments are highly appreciated.
> > ---------
> > #error.log
> > [error] Can't locate object method "bootstrap" via package "DBI" at
> > F:/Net/Perl/site/lib/DBI.pm line 249.
> > BEGIN failed--compilation aborted at F:/Net/Perl/site/lib/DBI.pm line 
>256.
> > Compilation failed in require at (eval 7) line 8.
> > BEGIN failed--compilation aborted at (eval 7) line 8.
> > ---------
> > #!F:/Net/Perl/bin/Perl.exe
> > ##
> > ##  Perl eg
> > use strict;
> > use DBI;
> >
> > my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p",
> > {PrintError=>0,RaiseError=>1});
> > $dbh->disconnect();
>
>Do you happen to have another Perl on your system? If so,
>it may be picking up something from this other version -
>try adding a
>    LoadFile "F:/Net/Perl/bin/perl58.dll"
>before you have the LoadModule directive that loads
>mod_perl.so. You might also try adjusting the
>PATH with an Apache directive, to ensure Apache sees
>F:/Net/Perl/bin as the 1st perl.

I have only one Perl installation.

>
>If you don't have another Perl, do you have problems using
>other modules with an xs component? For example, does
>    use Digest::MD2;
>cause problems (assuming you have Digest::MD2 installed)?

here's the script i ran:
--
#!F:/Net/Perl/bin/Perl.exe

print "Content-type: text/plain\n\n";
use strict;

# OO style
use Digest::MD2;

my $ctx = Digest::MD2->new;
my $data = "foo";
$ctx->add($data);

my $digest = $ctx->digest;
--
#error.log
[error] Can't locate object method "new" via package "Digest::MD2" at (eval 
16) line 9.\n

it works fine in cgi-bin, but it doesn't in the mod_perl dir...

>
>Is F a network drive?

No, F is a fat32 drive...must it be strictly be nfs?

>
>--
>best regards,
>randy kobes
>
>--
>Report problems: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
>List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>

_________________________________________________________________
Fast. Clear. Easy. The new face of MSN Search. http://search.msn.com.sg/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [error] Can't locate object method "bootstrap" via package "DBI"

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 29 Nov 2004, Ray Chuan wrote:

> Hi, I have DBI 1.45, Apache 2.052 Win32, mod_perl 1.99_17,
> Perl 5.84. I get that error when working with DBI in the
> /perl dir of apache. works fine on cmd-line and cgi-bin.
>
> Any comments are highly appreciated.
> ---------
> #error.log
> [error] Can't locate object method "bootstrap" via package "DBI" at
> F:/Net/Perl/site/lib/DBI.pm line 249.
> BEGIN failed--compilation aborted at F:/Net/Perl/site/lib/DBI.pm line 256.
> Compilation failed in require at (eval 7) line 8.
> BEGIN failed--compilation aborted at (eval 7) line 8.
> ---------
> #!F:/Net/Perl/bin/Perl.exe
> ##
> ##  Perl eg
> use strict;
> use DBI;
>
> my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p",
> {PrintError=>0,RaiseError=>1});
> $dbh->disconnect();

Do you happen to have another Perl on your system? If so,
it may be picking up something from this other version -
try adding a
   LoadFile "F:/Net/Perl/bin/perl58.dll"
before you have the LoadModule directive that loads
mod_perl.so. You might also try adjusting the
PATH with an Apache directive, to ensure Apache sees
F:/Net/Perl/bin as the 1st perl.

If you don't have another Perl, do you have problems using
other modules with an xs component? For example, does
   use Digest::MD2;
cause problems (assuming you have Digest::MD2 installed)?

Is F a network drive?

-- 
best regards,
randy kobes

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html