Thaks a lot for the help. Maybe you can give me more help. When I added the two lines to my http.conf file
SetEnv LD_LIBRARY_PATH /usr/local/pgsql/lib PassEnv LD_LIBRARY_PATH
While restarting the server:
Stopping httpd: [ OK ]
Starting httpd: [Sun Oct 17 15:41:42 2004] [warn] PassEnv variable LD_LIBRARY_PATH was undefined
I read the Apache book and could not figure out what is wrong. It could be a hidden trick. It must be
something obvious that I missed.
Kemin
Stas Bekman wrote:
Kemin Zhou wrote:
I have a linking problem
error message:
/usr/local/bin/gecods: error while loading shared libraries: libpq++.so.4: cannot open shared object file: No such file or directory
===
I compiled a simple program called gecods, it dynamically links to libpq++.so.4 in
/usr/local/pgsql/lib/ (a postgres database C++ interface)
I can run gecods program with no problem with me as user. My modperl perl program is a simple test program:
It simply calls the C++ program, gecods and capture the output
$result=`/usr/local/bin/gecods -f $inputfile`;
This works in a normal shell enviroment. But when I run this under mod_perl it cannot find the
libpq++.so.4
I tried to make a copy of libpq++.so.4 in /usr/local/apache2/lib This did not fix the problem I made another copy to /usr/local/lib It did not fix the problem either.
During the compilation of my simple program gecods my linking dir is set $LD_LIBRARY_PATH=/usr/local/pgsql/lib
Kemin, try to add:
PassEnv LD_LIBRARY_PATH
to your httpd.conf. Normally environment from the shell is not copied into Apache runtime. You need to explicitly specify the variables to make available to programs running under mod_perl.
If you need this before the response phase, use PerlPassEnv instead:
http://perl.apache.org/docs/1.0/guide/config.html#PerlSetEnv_and_PerlPassEnv
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html