Loading ...
Sorry, an error occurred while loading the content.

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

Expand Messages
  • Ray Chuan
    ... 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
    Message 1 of 13 , Dec 2, 2004
    • 0 Attachment
      >From: Randy Kobes <randy@...>
      >To: Ray Chuan <rctay1989@...>
      >CC: modperl@...
      >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
    • Randy Kobes
      ... Sorry I wasn t clear - I meant to try this in a handler other then ModPerl::Registry, something like: =====================================================
      Message 2 of 13 , Dec 2, 2004
      • 0 Attachment
        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
      • Stas Bekman
        Please show us your perl config: Perl.exe -V It s possible that for some reason the location of XS modules is not found. --
        Message 3 of 13 , Dec 2, 2004
        • 0 Attachment
          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@... 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
        • Ray Chuan
          perl -V: === Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
          Message 4 of 13 , Dec 2, 2004
          • 0 Attachment
            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 <stas@...>
            >To: Randy Kobes <randy@...>
            >CC: Ray Chuan <rctay1989@...>, modperl@...
            >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@... 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
          • Ray Chuan
            yes, it worked...great, first time smth with DBI worked. Apache, MySQL and Perl all sit in the same dir, and drive. ...
            Message 5 of 13 , Dec 2, 2004
            • 0 Attachment
              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 <randy@...>
              >To: Ray Chuan <rctay1989@...>
              >CC: modperl@...
              >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
            • Ray Chuan
              Thanks for all the help. Apparently, I changed the Apache s service logon settings, and it now works. ...
              Message 6 of 13 , Dec 2, 2004
              • 0 Attachment
                Thanks for all the help. Apparently, I changed the Apache's service logon
                settings, and it now works.

                >From: "Ray Chuan" <rctay1989@...>
                >To: randy@...
                >CC: modperl@...
                >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 <randy@...>
                >>To: Ray Chuan <rctay1989@...>
                >>CC: modperl@...
                >>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
              • Ray Chuan
                For the sake of completion, the problem was solved by checking the option in Properties- Logon Allow service to interact with Desktop ...
                Message 7 of 13 , Dec 3, 2004
                • 0 Attachment
                  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" <rctay1989@...>
                  >To: randy@...
                  >CC: modperl@...
                  >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
                Your message has been successfully submitted and would be delivered to recipients shortly.