Problems installing DBI

From: Ben (bhebert_at_borabora.crchul.ulaval.ca)
Date: 01/19/04

  • Next message: Stas Bekman: "Re: Proxy: (Fwd) [patch] make Storable thread-safe"
    Date: 19 Jan 2004 14:14:55 -0800
    
    

    Hello.

    I have installed both Bundle::DBI and DBD::Oracle on a Sun Solaris 8
    machine. The Oracle 9i database is installed on a remote server.

    The test script I developed works just fine as root, but fails
    miserably as non-root. Here is the script:

    #!/usr/bin/perl -w
    use DBI;

    ($user, $pass) = @ARGV;
    $dbi = DBI->connect('dbi:Oracle:host=tahiti.crchul.ulaval.ca;sid=murin;port=1521',
    $user, $pass);
    $sel=$dbi->prepare("select SYSDATE from dual");
    $sel->execute || die "Probleme de selection ";
    while (($champ)=$sel->fetchrow_array) {
        print "$champ\n";
    }
    $sel->finish;
    $dbi->disconnect;

    The execution as root:
    @proteo/export/home/hebben01>perl test.pl **username** **password**
    14-JAN-04

    and as a normal user:
    @proteo/export/home/hebben01>perl test.pl **username** **password**
    Can't locate loadable object for module DBI in @INC (@INC contains:
    /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1
    /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .)
    at /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 252
    BEGIN failed--compilation aborted at
    /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 252.
    Compilation failed in require at test.pl line 2.
    BEGIN failed--compilation aborted at test.pl line 2.

    It does look a lot like I should check permissions on DBI.pm, but they
    look fine in every location specified in @INC - everyone can read the
    files in those directories.

    Can anyone help me?
    Thanks!!

    ~Ben


  • Next message: Stas Bekman: "Re: Proxy: (Fwd) [patch] make Storable thread-safe"

    Relevant Pages

    • Problems running DBI
      ... The test script I developed works just fine as root, ... miserably as non-root. ... Can't locate loadable object for module DBI in @INC (@INC contains: ...
      (perl.dbi.users)
    • Re: List Variable becomes undefined inexplicably
      ... could run the test script to reproduce the problem. ... It is certainly not the root cause. ... Perl could, were it implemented that way, but it was not and does not. ...
      (comp.lang.perl.misc)
    • Re: setuid root
      ... with the priviledge of the root. ... I came to know setuid is the way to do this. ... here is my test script. ... # chmod 4755 ./tst ...
      (comp.unix.programmer)
    • Re: [SLE] GUI program in X from script in /etc/ppp/ip-up.d?
      ... > How do I get a GUI program (kdialog) to show on the X screen by a ... I think this should work for any user other than root, ... > A test script looks like this: ...
      (SuSE)