pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
trouble finding the object method driver....
4+ messages / 2 participants
[nested] [flat]

* trouble finding the object method driver....
@ 2001-04-03 00:16 Jerry Asher <jerry@hollyjerry.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Jerry Asher @ 2001-04-03 00:16 UTC (permalink / raw)
  To: pgsql-interfaces

Hi,

I am trying to get webcal 3.03,
(http://bulldog.tzo.org/webcal/webcal.html) running on my Red Hat Linux
6.1 system.

I am using PostgreSQL 7.1beta5, and perl5.00503.

I am a perl newbie, but familiar with webservers and postgres.

Caveat: I know what @INC does, but I have no idea how to set it.

At a suggestion from then net, I have recently (today) loaded DBI::DBD
and Bundle::DBI

  perl -MCPAN -e 'install DBI::DBD'
  perl -MCPAN -e 'install Bundle::DBI'

I then followed the instructions in
postgresql-7.1beta5/src/interfaces/perl5/README, and installed Pg.pm.

When I then tried to run webcal, Apache/Webcal complained that:

  install_driver(Pg) failed: [Mon Apr 2 17:13:01 2001] webcal.cgi: Can't
  locate DBD/Pg.pm in @INC (@INC contains: /home/httpd/cgi-bin/webcal
  /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
  /usr/lib/perl5/site_perl/5.005/i386-linux
  /usr/lib/perl5/site_perl/5.005 .) at (eval 4) line 3. Perhaps the
  DBD::Pg perl module hasn't been fully installed, or perhaps the
  capitalisation of 'Pg' isn't right. Available drivers: ADO, ExampleP,
  Multiplex, Proxy. at /home/httpd/cgi-bin/webcal/webcal_io.pm line 282
  
Investigating, I found that Pg.pm had been placed in 
/usr/lib/perl5/site_perl/5.005/i386-linux and not in
/usr/lib/perl5/site_perl/5.005/i386-linux/DBD

So I linked from one to the other
 ln -s Pg.pm DBD/Pg.pm

When I rerun webcal, Apache/webcal tells me:

  DBD::Pg initialisation failed: [Mon Apr 2 17:15:31 2001] webcal.cgi:
  Can't locate object method "driver" via package "DBD::Pg" at
  /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 520. Perhaps the
  capitalisation of DBD 'Pg' isn't right. at
  /home/httpd/cgi-bin/webcal/webcal_io.pm line 282

This is what DBI.pm looks like:

  # $Id: DBI.pm,v 10.34 2001/03/30 14:35:41 timbo Exp $
  #
  # Copyright (c) 1994-2000  Tim Bunce  England
  #
  # See COPYRIGHT section in pod text below for usage and distribution rights.
  #
  
  /usr/lib/perl5/site_perl/5.005/i586-linux/DBI.pm
  
  sub install_driver {		# croaks on failure
    ...
      # --- run the driver function
      $drh = eval { $driver_class->driver($attr || {}) };


Can you offer me some tips or advice on how to proceed?

Thank you,

Jerry Asher

perl -v

    This is perl, version 5.005_03 built for i386-linux
  
    Copyright 1987-1999, Larry Wall
  
    Perl may be copied only under the terms of either the Artistic License or the
    GNU General Public License, which may be found in the Perl 5.0 source kit.
    
    Complete documentation for Perl, including FAQ lists, should be found on
    this system using `man perl' or `perldoc perl'.  If you have access to the
    Internet, point your browser at http://www.perl.com/, the Perl Home Page.


perl -V
    Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
      Platform:
        osname=linux, osvers=2.2.5-22smp, archname=i386-linux
        uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown '
        hint=recommended, useposix=true, d_sigaction=define
        usethreads=undef useperlio=undef d_sfio=undef
      Compiler:
        cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
        cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
        ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
        stdchar='char', d_stdstdio=undef, usevfork=false
        intsize=4, longsize=4, ptrsize=4, doublesize=8
        d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
        alignbytes=4, usemymalloc=n, prototype=define
      Linker and Libraries:
        ld='cc', ldflags =' -L/usr/local/lib'
        libpth=/usr/local/lib /lib /usr/lib
        libs=-lnsl -ldl -lm -lc -lposix -lcrypt
        libc=, so=so, useshrplib=false, libperl=libperl.a
      Dynamic Linking:
        dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
        cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
    
    
    Characteristics of this binary (from libperl): 
      Built under linux
      Compiled at Aug 30 1999 23:09:51
      @INC:
        /usr/lib/perl5/5.00503/i386-linux
        /usr/lib/perl5/5.00503
        /usr/lib/perl5/site_perl/5.005/i386-linux
        /usr/lib/perl5/site_perl/5.005
      .
psql -V
    psql (PostgreSQL) 7.1beta5
    contains readline, history support
    Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
    Portions Copyright (c) 1996 Regents of the University of California
    Read the file COPYRIGHT or use the command \copyright to see the
    usage and distribution terms.

[root@web DBD]# which pgsql_perl5
which: no pgsql_perl5 in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin:/home/nsadmin/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin)
[root@web DBD]# locate pgsql_perl5




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* trouble finding the object method driver....
@ 2001-04-03 00:18 Jerry Asher <jerry@hollyjerry.org>
  2001-04-03 01:09 ` Re: trouble finding the object method driver.... Tom Lane <tgl@sss.pgh.pa.us>
  2001-04-03 02:16 ` Re: trouble finding the object method driver.... Jerry Asher <jerry@hollyjerry.org>
  0 siblings, 2 replies; 4+ messages in thread

From: Jerry Asher @ 2001-04-03 00:18 UTC (permalink / raw)
  To: pgsql-interfaces

Hi,

I am trying to get webcal 3.03,
(http://bulldog.tzo.org/webcal/webcal.html) running on my Red Hat Linux
6.1 system.

I am using PostgreSQL 7.1beta5, and perl5.00503.

I am a perl newbie, but familiar with webservers and postgres.

Caveat: I know what @INC does, but I have no idea how to set it.

At a suggestion from then net, I have recently (today) loaded DBI::DBD
and Bundle::DBI

  perl -MCPAN -e 'install DBI::DBD'
  perl -MCPAN -e 'install Bundle::DBI'

I then followed the instructions in
postgresql-7.1beta5/src/interfaces/perl5/README, and installed Pg.pm.

When I then tried to run webcal, Apache/Webcal complained that:

  install_driver(Pg) failed: [Mon Apr 2 17:13:01 2001] webcal.cgi: Can't
  locate DBD/Pg.pm in @INC (@INC contains: /home/httpd/cgi-bin/webcal
  /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
  /usr/lib/perl5/site_perl/5.005/i386-linux
  /usr/lib/perl5/site_perl/5.005 .) at (eval 4) line 3. Perhaps the
  DBD::Pg perl module hasn't been fully installed, or perhaps the
  capitalisation of 'Pg' isn't right. Available drivers: ADO, ExampleP,
  Multiplex, Proxy. at /home/httpd/cgi-bin/webcal/webcal_io.pm line 282
  
Investigating, I found that Pg.pm had been placed in 
/usr/lib/perl5/site_perl/5.005/i386-linux and not in
/usr/lib/perl5/site_perl/5.005/i386-linux/DBD

So I linked from one to the other
 ln -s Pg.pm DBD/Pg.pm

When I rerun webcal, Apache/webcal tells me:

  DBD::Pg initialisation failed: [Mon Apr 2 17:15:31 2001] webcal.cgi:
  Can't locate object method "driver" via package "DBD::Pg" at
  /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 520. Perhaps the
  capitalisation of DBD 'Pg' isn't right. at
  /home/httpd/cgi-bin/webcal/webcal_io.pm line 282

This is what DBI.pm looks like:

  # $Id: DBI.pm,v 10.34 2001/03/30 14:35:41 timbo Exp $
  #
  # Copyright (c) 1994-2000  Tim Bunce  England
  #
  # See COPYRIGHT section in pod text below for usage and distribution rights.
  #
  
  /usr/lib/perl5/site_perl/5.005/i586-linux/DBI.pm
  
  sub install_driver {		# croaks on failure
    ...
      # --- run the driver function
      $drh = eval { $driver_class->driver($attr || {}) };


Can you offer me some tips or advice on how to proceed?

Thank you,

Jerry Asher

perl -v

    This is perl, version 5.005_03 built for i386-linux
  
    Copyright 1987-1999, Larry Wall
  
    Perl may be copied only under the terms of either the Artistic License or the
    GNU General Public License, which may be found in the Perl 5.0 source kit.
    
    Complete documentation for Perl, including FAQ lists, should be found on
    this system using `man perl' or `perldoc perl'.  If you have access to the
    Internet, point your browser at http://www.perl.com/, the Perl Home Page.


perl -V
    Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
      Platform:
        osname=linux, osvers=2.2.5-22smp, archname=i386-linux
        uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown '
        hint=recommended, useposix=true, d_sigaction=define
        usethreads=undef useperlio=undef d_sfio=undef
      Compiler:
        cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
        cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
        ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
        stdchar='char', d_stdstdio=undef, usevfork=false
        intsize=4, longsize=4, ptrsize=4, doublesize=8
        d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
        alignbytes=4, usemymalloc=n, prototype=define
      Linker and Libraries:
        ld='cc', ldflags =' -L/usr/local/lib'
        libpth=/usr/local/lib /lib /usr/lib
        libs=-lnsl -ldl -lm -lc -lposix -lcrypt
        libc=, so=so, useshrplib=false, libperl=libperl.a
      Dynamic Linking:
        dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
        cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
    
    
    Characteristics of this binary (from libperl): 
      Built under linux
      Compiled at Aug 30 1999 23:09:51
      @INC:
        /usr/lib/perl5/5.00503/i386-linux
        /usr/lib/perl5/5.00503
        /usr/lib/perl5/site_perl/5.005/i386-linux
        /usr/lib/perl5/site_perl/5.005
      .
psql -V
    psql (PostgreSQL) 7.1beta5
    contains readline, history support
    Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
    Portions Copyright (c) 1996 Regents of the University of California
    Read the file COPYRIGHT or use the command \copyright to see the
    usage and distribution terms.

[root@web DBD]# which pgsql_perl5
which: no pgsql_perl5 in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin:/home/nsadmin/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin:/orasw/app/oracle/product/8.1.6/bin:/orasw/app/oracle/product/8.1.6/ctx/lib:/usr/local/pgsql/bin:/opt/ajuba/TclPro1.4/linux-ix86/bin)
[root@web DBD]# locate pgsql_perl5




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: trouble finding the object method driver....
  2001-04-03 00:18 trouble finding the object method driver.... Jerry Asher <jerry@hollyjerry.org>
@ 2001-04-03 01:09 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2001-04-03 01:09 UTC (permalink / raw)
  To: Jerry Asher <jerry@hollyjerry.org>; +Cc: pgsql-interfaces

Jerry Asher <jerry@hollyjerry.org> writes:
> At a suggestion from then net, I have recently (today) loaded DBI::DBD
> and Bundle::DBI
>   perl -MCPAN -e 'install DBI::DBD'
>   perl -MCPAN -e 'install Bundle::DBI'
> I then followed the instructions in
> postgresql-7.1beta5/src/interfaces/perl5/README, and installed Pg.pm.

interfaces/perl5 is a standalone interface module for Perl.  It has
nothing to do with DBI.  In particular, it is *not* the same thing as
DBD-Pg, which is the Pg driver that DBI is looking for.  You can find
DBD-Pg in the same CPAN archives you got DBI from.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: trouble finding the object method driver....
  2001-04-03 00:18 trouble finding the object method driver.... Jerry Asher <jerry@hollyjerry.org>
@ 2001-04-03 02:16 ` Jerry Asher <jerry@hollyjerry.org>
  1 sibling, 0 replies; 4+ messages in thread

From: Jerry Asher @ 2001-04-03 02:16 UTC (permalink / raw)
  To: pgsql-interfaces

At 09:09 PM 4/2/01 -0400, you wrote:
>Jerry Asher <jerry@hollyjerry.org> writes:
> > At a suggestion from then net, I have recently (today) loaded DBI::DBD
> > and Bundle::DBI
> >   perl -MCPAN -e 'install DBI::DBD'
> >   perl -MCPAN -e 'install Bundle::DBI'
> > I then followed the instructions in
> > postgresql-7.1beta5/src/interfaces/perl5/README, and installed Pg.pm.
>
>interfaces/perl5 is a standalone interface module for Perl.  It has
>nothing to do with DBI.  In particular, it is *not* the same thing as
>DBD-Pg, which is the Pg driver that DBI is looking for.  You can find
>DBD-Pg in the same CPAN archives you got DBI from.
>
>                         regards, tom lane

Thanks Tom, Woo hoo!  It works!

Perhaps a bit of my stumble was caused by this message

>Perhaps the
>DBD::Pg perl module hasn't been fully installed, or perhaps the
>capitalisation of 'Pg' isn't right. Available drivers: ADO, ExampleP,
>Multiplex, Proxy. at /home/httpd/cgi-bin/webcal/webcal_io.pm line 282

Which appears to use the same name for the DBD module as for the 
interfaces/perl5 module.

Is there a naming convention I should learn about?

Thanks again!

Jerry Asher



=====================================================
Jerry Asher                       jerry@hollyjerry.org
1678 Shattuck Avenue Suite 161    Tel: (510) 549-2980
Berkeley, CA 94709                Fax: (877) 311-8688




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-04-03 02:16 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-03 00:16 trouble finding the object method driver.... Jerry Asher <jerry@hollyjerry.org>
2001-04-03 00:18 trouble finding the object method driver.... Jerry Asher <jerry@hollyjerry.org>
2001-04-03 01:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-04-03 02:16 ` Jerry Asher <jerry@hollyjerry.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox