RE: :mysql and libmysqlclient.so.10

2001-11-29 Thread William Rusch

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.

-Original Message-
From: Ryan Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 4:43 AM
To: [EMAIL PROTECTED]
Subject: DBD::mysql and libmysqlclient.so.10



Hi everybody,

I hope I'm asking this on the right forum... But this question
involves several different packages :-)

On a FreeBSD 4.4 system, I am trying to use DBD::mysql (in my library,
I have use Mysql) with mod_perl 1.26. However, when running under
mod_perl (and ONLY when running under mod_perl, it seems), I receive
the following error (lines wrapped, here) in my apache log, and the
execution fails:

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.

I expect this may be a FAQ, and I swear I've run across this before,
but haven't had any luck grepping my notes.

Help? :-)

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






RE: :mysql and libmysqlclient.so.10

2001-11-29 Thread Ryan Thompson

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




RE: :mysql and libmysqlclient.so.10

2001-11-29 Thread William Rusch

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






RE: :mysql and libmysqlclient.so.10

2001-11-29 Thread Wilt, Paul

Don't you need to add a PerlPassEnv LD_LIBRARY_PATH for this to work?

Paul E Wilt 
Principal Software Engineer



__
XanEdu, Inc. (division of Proquest Information and Learning)
http://www.xanedu.com  mailto:[EMAIL PROTECTED] 
300 North Zeeb Rd  Phone: (734) 302-6545  (800) 218-5971 x6545
Ann Arbor, MI 48106Fax:   (734) 975-6440



__



-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



RE: :mysql and libmysqlclient.so.10

2001-11-29 Thread Ryan Thompson

William Rusch wrote to Ryan Thompson:

 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.

Hi William (and everyone else who has replied),

Thanks for the replies. I have tried all of the suggestions that you
and others have recommended (including some ideas of my own). So far,
I'm still stuck at the same place I was when this all started
yesterday ;-)

Here is what I have tried so far, to sum things up:

Running ldconfig -R to make sure libmysqlclient.so.10 is in the list
$ENV{'LD_LIBRARY_PATH'} = '/usr/local/lib/mysql',  or
$ENV{'LD_LIBRARY_PATH'} = '/usr/local/lib/mysql/'
PerlSetEnv  LD_LIBRARY_PATH /usr/local/lib/mysql

Checked library locations, file permissions, configuration, etc from a
working installation on FreeBSD 3.5 with mod_perl 1.25. (No
differences found, except the FreeBSD 3.5 box uses an older version of
libmysqlclient.so).


And then full restart Apache (apachectl stop  apachectl start) after
trying each one of these.

I HAVEN'T yet striven to recompile mod_perl, but I suspect that may be
where I am headed next. mod_perl is compiled as a DSO, with APXS.

- 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