-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 22 September 2002 10:33, Rich DeSimone wrote:
> [Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] Can't locate
> loadable object for module DBI in @INC (@INC contains:
> /usr/local/lib/perl5/5.8.0/i686-linux
> /usr/local/lib/perl5/5.8.0
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux
> /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .)
> at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 243
> [Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] BEGIN
> failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 243.

howdy,

usually "can't locate loadable object" means it's looking for some kind of 
shared library (i.e. a ".DLL" or ".so" file) and either can't find it, or 
can't open it (permissions issues.) for DBI it may be looking for a 
shared library to access the specific database type you're using (such as 
"libmysql.so" or something similar- i would include a real filename but 
i'm at home and my dev boxes are at work behind the firewall.)

i would start by reading /usr/.../DBI.pm (where the error message is 
happening), look at line 243, and see if you can figure out what library 
it's trying to load. then figure out why it can't load, whether it's a 
permissions issue or a missing symlink or something.

also remember that the built-in @INC for mod_perl may not the same as the 
built-in @INC for your command-line perl interpreter. the list above is 
the built-in @INC for the mod_perl you're running, and running "perl -V" 
will show you the built-in @INC for your command-line perl.

if you've upgraded perl, DBI, or DBD::mysql since you compiled mod_perl, 
it may be looking for old library files that don't exist anymore.

you may also want to try running your httpd with the "-X" parameter, 
inside of a program like strace or ltrace, and read the output file to 
see what library it's trying to load. it can generate a LOT of output, 
but it will show you exactly what filename it's trying to open and what 
the error code was (i.e. ENOENT=file not found, EPERM=permissions, etc.)

try something like this:

ltrace -S -o trace.out /usr/sbin/httpd -X

you won't see anything extra on the screen while it's running, and it will 
run much more slowly than normal (you don't want to leave it running like 
this all the time.)

try hitting your script from a browser. after it doesn't work, go back to 
the console where this command is running and hit control-c to shut down 
httpd. read through the "trace.out" file and see if you can find the 
open() or dlopen() call that's failing. you may be able to use the time 
stamp from your error_log to find the right place in the trace output 
file.



some other things to try...

you may want to run "ldconfig" to rebuild your shared library cache and 
see if that helps (it doesn't hurt anything to run it whenever you feel 
like it.) start/restart your httpd after it finishes, and then try your 
script again.



if it's a permissions issue (and even if it's not) i have a script that i 
call "pfix", which fixes permissions on the perl library directories. 
some CPAN modules, when you install them as root, install the files with 
root-only permissions. i run this script as a cron job every day, along 
with every time i install anything from CPAN. the script looks like this:

#!/bin/sh
chmod -R go=u-w /usr/lib/perl* /usr/local/lib/perl* /www/perl



sorry i can't be more help than this, i haven't switched to perl 5.8, 
apache 2, or mod_perl2 yet, which means i can't do a live test myself.

- -- 
- ----------------------------------------
| John Simpson     Programmer at Large |
| <[EMAIL PROTECTED]> http://www.jms1.net/ |
- ----------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9joyjEB9RczMG/PsRArJJAJ9RWpzHiE6uCWeDIS0JMfK2gMHm4gCgqqcW
2ueAGIytfnWhapbMcXwDteE=
=Skl2
-----END PGP SIGNATURE-----

Reply via email to