I use oracle and with DBI I had a similiar problem. although I could run all
the oracle client software without having to set this variable i had to set
it when i connected through dbi,however this happened with standard cgi's as
well.

I usually set it in my connection subroutine ie..
$ENV{'LD_LIBRARY_PATH'} = '/path to library';
$dbh = DBI->connect(......);

I use true64 and linux so I'm not even positive that the LD_LIBRARY_PATH is
the right environment variable for freebsd. But if it is, it's worth trying.

maybe the ld_library_path got altered on the mod_perl compilation....
wouldn't really have a clue beyond that.

-----Original Message-----
From: Ryan Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 12:41 PM
To: William Rusch
Cc: [EMAIL PROTECTED]
Subject: RE: :mysql and libmysqlclient.so.10


William Rusch wrote to Ryan Thompson and [EMAIL PROTECTED]:

> Ryan Thompson wrote:
> > Can't load
> >
'/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBD/mysql/mysql.so'
> > for module DBD::mysql: Shared object "libmysqlclient.so.10" not
> > found at /usr/libdata/perl/5.00503/Dynaloader.pm line 169.
> >
> > libmysqlclient.so.10 DOES exist, and has been successfully
> > configured with ldconfig. And, scripts NOT running under mod_perl
> > can use Mysql without a problem.
>
> Usually when I see an error like this i suspect the
> ld_library_path needs to be set to include the missing dynamic
> library. Try setting it to include your mysql/lib folder if this
> could be the problem.

Just to clarify... this library IS configured with ldconfig... so,
unless I'm mistaken (which is quite possible :-), wouldn't setting
LD_LIBRARY_PATH be unnecessary? If I'm wrong, where is the best place
to set LD_LIBRARY_PATH?

# ldconfig -r | grep mysql
        search directories: /usr/lib:/usr/lib/compat:/usr/local/lib:
/usr/local/lib/mysql
        69:-lmysqlclient.10 => /usr/local/lib/mysql/libmysqlclient.so.10

libmysqlclient.so.10 exists in the above location, has all appropriate
permissions, no write bits set on it, or the parent directory, and it
WORKS with the mysql client utilities (or do they link it
statically?).

The same scripts ALSO work in plain CGI directories not using
mod_perl, which is one of the main reasons I'm asking on this list ;-)

Thanks,
- Ryan

--
  Ryan Thompson <[EMAIL PROTECTED]>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America



Reply via email to