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

Re: DBI and SOAP::LITE

Expand Messages
  • caboose@c-lab.de
    Well, I m a far as that (since about 5 min):even though I have changed the ENV Variable LD_LIBRARY_PATH DBI still cant locate libz.so. I couldn t see this
    Message 1 of 10 , Jul 4, 2001
    • 0 Attachment
      Well, I'm a far as that (since about 5 min):even though I have
      changed the ENV Variable LD_LIBRARY_PATH DBI still cant locate
      libz.so.

      I couldn't see this error because of the Soap Encapsulation.
      When I moved the DB access in front of the SOAP stuff it showed up in
      the server log.

      So I'm bugging out Perl guru with it, tomorrow morning. Thanks for
      trying.

      --- In soaplite@y..., "Chris Davies" <Chris.Davies@M...> wrote:
      > Sorry, I'm puzzled. What can't you do? You should be able to test a
      CGI
      > script that performs DBI accesses without needing to include SOAP.
      Something
      > trivial would do to confirm interoperability. If this simple DBI
      program
      > doesn't work (syntax errors excepted, of course) then it's clearly
      not a
      > SOAP issue and you'll need to investigate the DBI problems
      elsewhere.
      >
      > use strict;
      > use CGI::Carp;
      > use DBI;
      >
      > my $dbh = DBI->connect (...) || die "connect: $DBI::errstr";
      > my $sth = $dbh->prepare ("SELECT...") || die "prepare:
      $DBI::errstr";
      > $sth->execute;
      >
      > print "Content-type: text/plain\n\n";
      > while (my $row = $sth->fetchrow_hashref) {
      > print map { "$_ = $row->{$_} } keys %$row, "\n";
      > }
      > $sth->finish;
      > $dbh->disconnect;
      > print "All done\n";
      > exit 0;
      > # E&OE of course
      >
      > I'll pick this up again tomorrow.
      > Cheers,
      > Chris
      >
      >
      > -----Original Message-----
      > From: caboose@c... [mailto:caboose@c...]
      > Sent: Wednesday, July 04, 2001 5:23 PM
      > To: soaplite@y...
      > Subject: [soaplite] Re: DBI and SOAP::LITE
      >
      >
      >
      > If I could do that, I wouldn't be asking around.
      > My problem is that the line DBI->connect
      > ("DBI:mysql:database=delivery;host=brest.c-lab.de","root","")
      > never completes execution. Whatever values (true or nonsense) I give
      > for the paramaters it does nowt. I can even put in nonsense for the
      > driver (mysql) it's still the same.
      >
      > It never gets to the ored die part.
      >
      > Any further line will never be exectuted. It seems to be stuck
      > somewhere in the DBI: part and never get any further.
      >
      > Sabine
      >
      > --- In soaplite@y..., "Chris Davies" <Chris.Davies@M...> wrote:
      > > Try including this near the top of the program:
      > > use CGI::Carp qw(fatalsToBrowser)
      > >
      > > and then (later):
      > > my $dbh =
      > > DBI->connect("DBI:mysql:database=delivery;host=brest.c-
      > lab.de","root","") ||
      > > die "Cannot connect to database: $DBI::errstr";
      > >
      > > Ideally you'll want to catch all errors, so include {RaiseError =>
      > 1} in the
      > > DBI attributes, or else check each return value:
      > > my $sth = $dbh->prepare("SELECT * from documents WHERE
      > name='$doc'") ||
      > > die "Cannot prepare SELECT statement: $DBI::errstr";
      > > $sth->execute() ||
      > > die "Cannot execute statement: $DBI::errstr";
      > >
      > > As I mentioned in another email, if you're having problems with a
      > CGI script
      > > containing both DBI and SOAP, try isolating the problem. For
      > example, check
      > > that DBI works in your CGI script, and then check that SOAP works
      > in your
      > > CGI script. It's almost certainly an issue with the CGI script
      > running
      > > without necessary environment variables, or under a username that
      > doesn't
      > > have access to your database (or its tables).
      > >
      > > Chris
    • Paul Kulchenko
      Hi, Sabine! I m not sure that s will help, but it s not enough to specify LD_LIBRARY_PATH. YOu need to pass it to your CGI script. Documentation for
      Message 2 of 10 , Jul 4, 2001
      • 0 Attachment
        Hi, Sabine!

        I'm not sure that's will help, but it's not enough to specify
        LD_LIBRARY_PATH. YOu need to pass it to your CGI script.
        Documentation for SOAP::Transport::HTTP has this:

        =item Dynamic libraries are not found

        If you see in webserver's log file something like this:

        Can't load
        '/usr/local/lib/perl5/site_perl/.../XML/Parser/Expat/Expat.so'
        for module XML::Parser::Expat: dynamic linker: /usr/local/bin/perl:
        libexpat.so.0 is NEEDED, but object does not exist at
        /usr/local/lib/perl5/.../DynaLoader.pm line 200.

        and you are using Apache web server, try to put into your httpd.conf

        <IfModule mod_env.c>
        PassEnv LD_LIBRARY_PATH
        </IfModule>

        Hope it helps.

        Best wishes, Paul.

        --- caboose@... wrote:
        > Well, I'm a far as that (since about 5 min):even though I have
        > changed the ENV Variable LD_LIBRARY_PATH DBI still cant locate
        > libz.so.
        >
        > I couldn't see this error because of the Soap Encapsulation.
        > When I moved the DB access in front of the SOAP stuff it showed up
        > in
        > the server log.
        >
        > So I'm bugging out Perl guru with it, tomorrow morning. Thanks for
        > trying.
        >
        > --- In soaplite@y..., "Chris Davies" <Chris.Davies@M...> wrote:
        > > Sorry, I'm puzzled. What can't you do? You should be able to test
        > a
        > CGI
        > > script that performs DBI accesses without needing to include
        > SOAP.
        > Something
        > > trivial would do to confirm interoperability. If this simple DBI
        > program
        > > doesn't work (syntax errors excepted, of course) then it's
        > clearly
        > not a
        > > SOAP issue and you'll need to investigate the DBI problems
        > elsewhere.
        > >
        > > use strict;
        > > use CGI::Carp;
        > > use DBI;
        > >
        > > my $dbh = DBI->connect (...) || die "connect: $DBI::errstr";
        > > my $sth = $dbh->prepare ("SELECT...") || die "prepare:
        > $DBI::errstr";
        > > $sth->execute;
        > >
        > > print "Content-type: text/plain\n\n";
        > > while (my $row = $sth->fetchrow_hashref) {
        > > print map { "$_ = $row->{$_} } keys %$row, "\n";
        > > }
        > > $sth->finish;
        > > $dbh->disconnect;
        > > print "All done\n";
        > > exit 0;
        > > # E&OE of course
        > >
        > > I'll pick this up again tomorrow.
        > > Cheers,
        > > Chris
        > >
        > >
        > > -----Original Message-----
        > > From: caboose@c... [mailto:caboose@c...]
        > > Sent: Wednesday, July 04, 2001 5:23 PM
        > > To: soaplite@y...
        > > Subject: [soaplite] Re: DBI and SOAP::LITE
        > >
        > >
        > >
        > > If I could do that, I wouldn't be asking around.
        > > My problem is that the line DBI->connect
        > > ("DBI:mysql:database=delivery;host=brest.c-lab.de","root","")
        > > never completes execution. Whatever values (true or nonsense) I
        > give
        > > for the paramaters it does nowt. I can even put in nonsense for
        > the
        > > driver (mysql) it's still the same.
        > >
        > > It never gets to the ored die part.
        > >
        > > Any further line will never be exectuted. It seems to be stuck
        > > somewhere in the DBI: part and never get any further.
        > >
        > > Sabine
        > >
        > > --- In soaplite@y..., "Chris Davies" <Chris.Davies@M...> wrote:
        > > > Try including this near the top of the program:
        > > > use CGI::Carp qw(fatalsToBrowser)
        > > >
        > > > and then (later):
        > > > my $dbh =
        > > > DBI->connect("DBI:mysql:database=delivery;host=brest.c-
        > > lab.de","root","") ||
        > > > die "Cannot connect to database: $DBI::errstr";
        > > >
        > > > Ideally you'll want to catch all errors, so include {RaiseError
        > =>
        > > 1} in the
        > > > DBI attributes, or else check each return value:
        > > > my $sth = $dbh->prepare("SELECT * from documents WHERE
        > > name='$doc'") ||
        > > > die "Cannot prepare SELECT statement: $DBI::errstr";
        > > > $sth->execute() ||
        > > > die "Cannot execute statement: $DBI::errstr";
        > > >
        > > > As I mentioned in another email, if you're having problems with
        > a
        > > CGI script
        > > > containing both DBI and SOAP, try isolating the problem. For
        > > example, check
        > > > that DBI works in your CGI script, and then check that SOAP
        > works
        > > in your
        > > > CGI script. It's almost certainly an issue with the CGI script
        > > running
        > > > without necessary environment variables, or under a username
        > that
        > > doesn't
        > > > have access to your database (or its tables).
        > > >
        > > > Chris
        >
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Get personalized email addresses from Yahoo! Mail
        http://personal.mail.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.