Re: setting LD_LIBRARY_PATH via PerlSetEnv does not work
It worked like a charm! If PerlSetEnv could not do it, I think this should be documented in the guide. I could not find any mention about ldconfig in the modperl guide. May be I missed it somehow. The procedure on linux is very simple: # echo $ORACLE_HOME/lib /etc/ld.so.conf # ldconfig Thanks Richard On Sun, Aug 20, 2000 at 08:11:50PM -0700, Yann Ramin wrote: As far as FreeBSD goes, LD_LIBRARY_PATH is not searched for setuid programs (aka, Apache). This isn't a problem for CGIs since they don't do a setuid (and are forked off), but Apache does, and mod_perl is in Apache. I think thats right anyway :) You could solve this globaly by running ldconfig (I assume Linux has it, FreeBSD does). You'd be looking for: ldconfig -m your directory here Hope that helps. Yann Richard Chen wrote: This is a redhat linux 6.2 box with perl 5.005_03, Apache 1.3.12, mod_perl 1.24, DBD::Oracle 1.06, DBI 1.14 and oracle 8.1.6. For some odd reason, in order to use DBI, I have to set LD_LIBRARY_PATH first. I don't think I needed to do this when I used oracle 7. This is fine on the command line because I can set it in the shell environment. For cgi scripts, the problem is also solved by using apache SetEnv directive. However, this trick does not work under modperl. I had tried PerlSetEnv to no avail. The message is the same as if the LD_LIBRARY_PATH is not set: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11 Here is the section defining LD_LIBRARY_PATH under Apache::Registry: PerlModule Apache::Registry Alias /perl/ /usr/local/apache/perl/ Location /perl PerlSetEnv LD_LIBRARY_PATH /u01/app/oracle/product/8.1.6/lib SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all /Location Does anyone know why PerlSetEnv does not work in this case? How come SetEnv works for cgi scripts? What is the work around? Thanks for any info. Richard -- Yann Ramin[EMAIL PROTECTED] Atrus Trivalie Productionswww.redshift.com/~yramin Monterey High IT www.montereyhigh.com ICQ 46805627 AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer (yes, this .signature is way too big) "All cats die. Socrates is dead. Therefore Socrates is a cat." - The Logician THE STORY OF CREATION In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of IBM was moving over the face of the market. And DEC said, "Let there be registers"; and there were registers. And DEC saw that they carried; and DEC seperated the data from the instructions. DEC called the data Stack, and the instructions they called Code. And there was evening and there was a maorning, one interrupt... -- Rico Tudor William Safire's Rules for Writers: Remembe
Re: setting LD_LIBRARY_PATH via PerlSetEnv does not work
On Mon, 21 Aug 2000, Richard Chen wrote: It worked like a charm! If PerlSetEnv could not do it, I think this should be documented in the guide. I could not find any mention done. thanks for the tip! about ldconfig in the modperl guide. May be I missed it somehow. The procedure on linux is very simple: # echo $ORACLE_HOME/lib /etc/ld.so.conf # ldconfig Thanks Richard On Sun, Aug 20, 2000 at 08:11:50PM -0700, Yann Ramin wrote: As far as FreeBSD goes, LD_LIBRARY_PATH is not searched for setuid programs (aka, Apache). This isn't a problem for CGIs since they don't do a setuid (and are forked off), but Apache does, and mod_perl is in Apache. I think thats right anyway :) You could solve this globaly by running ldconfig (I assume Linux has it, FreeBSD does). You'd be looking for: ldconfig -m your directory here Hope that helps. Yann Richard Chen wrote: This is a redhat linux 6.2 box with perl 5.005_03, Apache 1.3.12, mod_perl 1.24, DBD::Oracle 1.06, DBI 1.14 and oracle 8.1.6. For some odd reason, in order to use DBI, I have to set LD_LIBRARY_PATH first. I don't think I needed to do this when I used oracle 7. This is fine on the command line because I can set it in the shell environment. For cgi scripts, the problem is also solved by using apache SetEnv directive. However, this trick does not work under modperl. I had tried PerlSetEnv to no avail. The message is the same as if the LD_LIBRARY_PATH is not set: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11 Here is the section defining LD_LIBRARY_PATH under Apache::Registry: PerlModule Apache::Registry Alias /perl/ /usr/local/apache/perl/ Location /perl PerlSetEnv LD_LIBRARY_PATH /u01/app/oracle/product/8.1.6/lib SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all /Location Does anyone know why PerlSetEnv does not work in this case? How come SetEnv works for cgi scripts? What is the work around? Thanks for any info. Richard -- Yann Ramin [EMAIL PROTECTED] Atrus Trivalie Productions www.redshift.com/~yramin Monterey High ITwww.montereyhigh.com ICQ 46805627 AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer (yes, this .signature is way too big) "All cats die. Socrates is dead. Therefore Socrates is a cat." - The Logician THE STORY OF CREATION In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of IBM was moving over the face of the market. And DEC said, "Let there be registers"; and there were registers. And DEC saw that they carried; and DEC seperated the data from the instructions. DEC called the data Stack, and the instructions they called Code. And there was evening and there was a maorning, one interrupt... -- Rico Tudor William Safire's Rules for Writers: Remembe _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com http://singlesheaven.com http://perlmonth.com perl.org apache.org
RE: setting LD_LIBRARY_PATH via PerlSetEnv does not work
I ran into this exact same problem this weekend using: -GNU ld 2.9.1 -DBD::Oracle 1.06 -DBI 1.14 -RH Linux 6.0 -Oracle 8i Here's another, cleaner (I think) solution to your problem: after running perl Makefile.PL, modify the resulting Makefile as follows: 1. search for the line LD_RUN_PATH= 2. replace it with LD_RUN_PATH=(my_oracle_home)/lib (my_oracle_home) is, of course, the home path to your oracle installation. In particular, the file libclntsh.so.8.0 should exist in that directory. (If you use cpan, the build directory for DBD::Oracle should be in ~/.cpan/build/DBD-Oracle-1.06/ if you're logged in as root.) Then, just type make install, and all should go well. FYI, setting LD_RUN_PATH has the effect of hard-coding the path to (my_oracle_home)/lib in the resulting Oracle.so file generated by the DBD::Oracle so that at run-time, it doesn't have to go searching through LD_LIBRARY_PATH or the default directories used by ld. The reason I think this is cleaner is because this way, the Oracle directory is not hardcoded globally into everyone's link paths, which is what ldconfig does. For more information, check out the GNU man page on ld: http://www.gnu.org/manual/ld-2.9.1/html_mono/ld.html or an essay on LD_LIBRARY_PATH: http://www.visi.com/~barr/ldpath.html cheers, Ed -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED]] Sent: Monday, August 21, 2000 6:51 AM To: Richard Chen Cc: Yann Ramin; [EMAIL PROTECTED] Subject: Re: setting LD_LIBRARY_PATH via PerlSetEnv does not work On Mon, 21 Aug 2000, Richard Chen wrote: It worked like a charm! If PerlSetEnv could not do it, I think this should be documented in the guide. I could not find any mention done. thanks for the tip! about ldconfig in the modperl guide. May be I missed it somehow. The procedure on linux is very simple: # echo $ORACLE_HOME/lib /etc/ld.so.conf # ldconfig Thanks Richard On Sun, Aug 20, 2000 at 08:11:50PM -0700, Yann Ramin wrote: As far as FreeBSD goes, LD_LIBRARY_PATH is not searched for setuid programs (aka, Apache). This isn't a problem for CGIs since they don't do a setuid (and are forked off), but Apache does, and mod_perl is in Apache. I think thats right anyway :) You could solve this globaly by running ldconfig (I assume Linux has it, FreeBSD does). You'd be looking for: ldconfig -m your directory here Hope that helps. Yann Richard Chen wrote: This is a redhat linux 6.2 box with perl 5.005_03, Apache 1.3.12, mod_perl 1.24, DBD::Oracle 1.06, DBI 1.14 and oracle 8.1.6. For some odd reason, in order to use DBI, I have to set LD_LIBRARY_PATH first. I don't think I needed to do this when I used oracle 7. This is fine on the command line because I can set it in the shell environment. For cgi scripts, the problem is also solved by using apache SetEnv directive. However, this trick does not work under modperl. I had tried PerlSetEnv to no avail. The message is the same as if the LD_LIBRARY_PATH is not set: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11 Here is the section defining LD_LIBRARY_PATH under Apache::Registry: PerlModule Apache::Registry Alias /perl/ /usr/local/apache/perl/ Location /perl PerlSetEnv LD_LIBRARY_PATH /u01/app/oracle/product/8.1.6/lib SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all /Location Does anyone know why PerlSetEnv does not work in this case? How come SetEnv works for cgi scripts? What is the work around? Thanks for any info. Richard -- Yann Ramin [EMAIL PROTECTED] Atrus Trivalie Productions www.redshift.com/~yramin Monterey High ITwww.montereyhigh.com ICQ 46805627 AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer (yes, this .signature is way too big) "All cats die. Socrates is dead. Therefore Socrates is a cat." - The Logician THE STORY OF CREATION In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of IBM was moving over the face of the market. And DEC said, "Let there be registers"; and there were registers. And DEC saw that they carried; and DEC seperated the data from the instructions. DEC cal
RE: setting LD_LIBRARY_PATH via PerlSetEnv does not work
On Mon, 21 Aug 2000, Ed Park wrote: I ran into this exact same problem this weekend using: -GNU ld 2.9.1 -DBD::Oracle 1.06 -DBI 1.14 -RH Linux 6.0 -Oracle 8i Here's another, cleaner (I think) solution to your problem: after running perl Makefile.PL, modify the resulting Makefile as follows: 1. search for the line LD_RUN_PATH= 2. replace it with LD_RUN_PATH=(my_oracle_home)/lib (my_oracle_home) is, of course, the home path to your oracle installation. In particular, the file libclntsh.so.8.0 should exist in that directory. (If you use cpan, the build directory for DBD::Oracle should be in ~/.cpan/build/DBD-Oracle-1.06/ if you're logged in as root.) Then, just type make install, and all should go well. FYI, setting LD_RUN_PATH has the effect of hard-coding the path to (my_oracle_home)/lib in the resulting Oracle.so file generated by the DBD::Oracle so that at run-time, it doesn't have to go searching through LD_LIBRARY_PATH or the default directories used by ld. The reason I think this is cleaner is because this way, the Oracle directory is not hardcoded globally into everyone's link paths, which is what ldconfig does. For more information, check out the GNU man page on ld: http://www.gnu.org/manual/ld-2.9.1/html_mono/ld.html or an essay on LD_LIBRARY_PATH: http://www.visi.com/~barr/ldpath.html Updated. Thanks Ed! Is there a way to set LD_RUN_PATH automatically during the: perl Makefile.PL stage, compared to a manual modification of the resulting Makefile? like: perl Makefile.PL LD_RUN_PATH=/foo/bar/lib ? cheers, Ed -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED]] Sent: Monday, August 21, 2000 6:51 AM To: Richard Chen Cc: Yann Ramin; [EMAIL PROTECTED] Subject: Re: setting LD_LIBRARY_PATH via PerlSetEnv does not work On Mon, 21 Aug 2000, Richard Chen wrote: It worked like a charm! If PerlSetEnv could not do it, I think this should be documented in the guide. I could not find any mention done. thanks for the tip! about ldconfig in the modperl guide. May be I missed it somehow. The procedure on linux is very simple: # echo $ORACLE_HOME/lib /etc/ld.so.conf # ldconfig Thanks Richard On Sun, Aug 20, 2000 at 08:11:50PM -0700, Yann Ramin wrote: As far as FreeBSD goes, LD_LIBRARY_PATH is not searched for setuid programs (aka, Apache). This isn't a problem for CGIs since they don't do a setuid (and are forked off), but Apache does, and mod_perl is in Apache. I think thats right anyway :) You could solve this globaly by running ldconfig (I assume Linux has it, FreeBSD does). You'd be looking for: ldconfig -m your directory here Hope that helps. Yann Richard Chen wrote: This is a redhat linux 6.2 box with perl 5.005_03, Apache 1.3.12, mod_perl 1.24, DBD::Oracle 1.06, DBI 1.14 and oracle 8.1.6. For some odd reason, in order to use DBI, I have to set LD_LIBRARY_PATH first. I don't think I needed to do this when I used oracle 7. This is fine on the command line because I can set it in the shell environment. For cgi scripts, the problem is also solved by using apache SetEnv directive. However, this trick does not work under modperl. I had tried PerlSetEnv to no avail. The message is the same as if the LD_LIBRARY_PATH is not set: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11 Here is the section defining LD_LIBRARY_PATH under Apache::Registry: PerlModule Apache::Registry Alias /perl/ /usr/local/apache/perl/ Location /perl PerlSetEnv LD_LIBRARY_PATH /u01/app/oracle/product/8.1.6/lib SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all /Location Does anyone know why PerlSetEnv does not work in this case? How come SetEnv works for cgi scripts? What is the work around? Thanks for any info. Richard -- Yann Ramin[EMAIL PROTECTED] Atrus Trivalie Productionswww.redshift.com/~yramin Monterey High IT www.montereyhigh.com ICQ 46805627 AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer (yes, this .signature is way too big) "All cats die. Socrates is dead. Therefore Socrates is a cat." - Th
setting LD_LIBRARY_PATH via PerlSetEnv does not work
This is a redhat linux 6.2 box with perl 5.005_03, Apache 1.3.12, mod_perl 1.24, DBD::Oracle 1.06, DBI 1.14 and oracle 8.1.6. For some odd reason, in order to use DBI, I have to set LD_LIBRARY_PATH first. I don't think I needed to do this when I used oracle 7. This is fine on the command line because I can set it in the shell environment. For cgi scripts, the problem is also solved by using apache SetEnv directive. However, this trick does not work under modperl. I had tried PerlSetEnv to no avail. The message is the same as if the LD_LIBRARY_PATH is not set: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11 Here is the section defining LD_LIBRARY_PATH under Apache::Registry: PerlModule Apache::Registry Alias /perl/ /usr/local/apache/perl/ Location /perl PerlSetEnv LD_LIBRARY_PATH /u01/app/oracle/product/8.1.6/lib SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all /Location Does anyone know why PerlSetEnv does not work in this case? How come SetEnv works for cgi scripts? What is the work around? Thanks for any info. Richard
Re: setting LD_LIBRARY_PATH via PerlSetEnv does not work
As far as FreeBSD goes, LD_LIBRARY_PATH is not searched for setuid programs (aka, Apache). This isn't a problem for CGIs since they don't do a setuid (and are forked off), but Apache does, and mod_perl is in Apache. I think thats right anyway :) You could solve this globaly by running ldconfig (I assume Linux has it, FreeBSD does). You'd be looking for: ldconfig -m your directory here Hope that helps. Yann Richard Chen wrote: This is a redhat linux 6.2 box with perl 5.005_03, Apache 1.3.12, mod_perl 1.24, DBD::Oracle 1.06, DBI 1.14 and oracle 8.1.6. For some odd reason, in order to use DBI, I have to set LD_LIBRARY_PATH first. I don't think I needed to do this when I used oracle 7. This is fine on the command line because I can set it in the shell environment. For cgi scripts, the problem is also solved by using apache SetEnv directive. However, this trick does not work under modperl. I had tried PerlSetEnv to no avail. The message is the same as if the LD_LIBRARY_PATH is not set: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11 Here is the section defining LD_LIBRARY_PATH under Apache::Registry: PerlModule Apache::Registry Alias /perl/ /usr/local/apache/perl/ Location /perl PerlSetEnv LD_LIBRARY_PATH /u01/app/oracle/product/8.1.6/lib SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On allow from all /Location Does anyone know why PerlSetEnv does not work in this case? How come SetEnv works for cgi scripts? What is the work around? Thanks for any info. Richard -- Yann Ramin [EMAIL PROTECTED] Atrus Trivalie Productions www.redshift.com/~yramin Monterey High ITwww.montereyhigh.com ICQ 46805627 AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer (yes, this .signature is way too big) "All cats die. Socrates is dead. Therefore Socrates is a cat." - The Logician THE STORY OF CREATION In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of IBM was moving over the face of the market. And DEC said, "Let there be registers"; and there were registers. And DEC saw that they carried; and DEC seperated the data from the instructions. DEC called the data Stack, and the instructions they called Code. And there was evening and there was a maorning, one interrupt... -- Rico Tudor William Safire's Rules for Writers: Remembe