ferrency has asked for the wisdom of the Perl Monks concerning the following question:
So... some part of the mod_perl installation process seems to have eluded me. This test.pl runs fine in mod_perl right now:
However... if I reboot my machine, it fails with this error in my apache_error.log:#!/usr/bin/perl use DBI; print "Content-type: text/html\n\n"; $d = DBI->connect("dbi:mysql:database=mysql", "root", ""); print "connected!!!!<br>" if $d;
The code snippet works from the command line just fine as well.[Sun Aug 6 20:26:20 2000] [error] install_driver(mysql) failed: Can't + load '/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/\ auto/DBD/mysql/mysql.so' for module DBD::mysql: Shared object "libmysq +lclient.so.6" not found at /usr/libdata/perl/5.00503/Dyna\ Loader.pm line 169. at (eval 41) line 3 at /usr/local/www/cgi-bin/test.pl line 7
If, after rebooting the machine, I do an apachectl stop and an apachectl start, it works.
The problem is, DynaLoader.pm isn't set up with the correct @ld_library_path when apache is started at boot time; but starting and stopping from a shell gives it the correct path. Looking at the source for DynaLoader.pm, it seems to be getting its path from the environment variable LD_LIBRARY_PATH (primarily). However, that environment variable doesn't exist in the shell I restarted Apache from, so I'm wondering where Perl is getting it from....
So, my basic question is: What configuration did I screw up that would cause DynaLoader not to get the correct @ld_library_path when apache is started at boot time?
Specs: FreeBSD 3.4, everything was installed from standard ports and packages... Apache 1.3.9; mod_perl 1.20; perl 5.005_03.
Anyone?
Thanks!
Alan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: !@*$%& mod_perl
by lindex (Friar) on Aug 07, 2000 at 08:23 UTC | |
|
Re: !@*$%& mod_perl
by ferrency (Deacon) on Aug 07, 2000 at 17:57 UTC |