in reply to Re: Do XS-components require special considerations with CGI?
in thread Do XS-components require special considerations with CGI? [SOLVED]
if you could kindly submit ... more-specific, information
Locate your mysql.so file (presumably ./lib/perl/5.8.8/auto/DBD/mysql/mysql.so) and run (from outside of Apache, where things (hopefully) work — but on the same machine):
$ ldd /path/to/mysql.so
This should list its dependencies, among which there is probably something like libmysqlclient.so.15 (if everything is OK, there should be no "... => not found" entries). Note the path where this lib is found, and then arrange for the LD_LIBRARY_PATH environment variable to contain that directory in the environment of the CGI program. See "man ld.so" for what this is about. One way to set it could be in a BEGIN block in your CGI script, e.g. (I'm appending here, just in case it's non-empty)
BEGIN { $ENV{LD_LIBRARY_PATH} .= ":/path/to/lib"; }
Other ways would be to use a shell wrapper, or via the SetEnv Apache config directive.
BTW, which platform are you on? I'm asking because (a) the
respective system tools (like ldd) might be different, (b) there is a special issue with LD_LIBRARY_PATH on Solaris,
which might apply here... sorry, overlooked the "linux host" in your OP
|
|---|