Re: grapher.cgi

Rick Frey <[email protected]>
Newsgroups gmane.network.cricket.user
Message-ID <[email protected]>
In a UNIX environment the variable LD_LIBRARY_PATH is used to determine 
the path to shared libraries (similar to PATH for executables). If 
LD_LIBRARY_PATH is not set for a user, a number of default locations are 
used (e.g. /usr/lib/ ). Guessing that the path to libdb 
(/usr/local/BerkeleyDB.4.4/lib) is already added to root and cricket's 
LD_LIBRARY_PATH.

However to add the path for Apache you can add to httpd.conf with a line 
similar to:

SetEnv LD_LIBRARY_PATH /usr/local/BerkeleyDB.4.4/lib

(if directive already exists, simply append the path to the existing 
value delimited with a ":")

I recommend adding in httpd.conf but Solaris 8 and above also has the 
ability to add a library path for all users using a tool called crle. 
You should read the man page for crle, as you could break things if you 
accidently remove /usr/lib from everyone's lib path. Without any 
arguments, it displays the current config file contents. You can add a 
directory by using the -l switch to crle. For example, if you run crle 
on a system that has only the defaults, you’ll see:

Default configuration file (/var/ld/ld.config) not found
Default Library Path (ELF): /usr/lib (system default)
Trusted Directories (ELF): /usr/lib/secure (system default)

If you want to add /usr/local/BerkeleyDB/lib, for example, you would run:

crle -l /usr/lib:/usr/local/BerkeleyDB/lib

This creates the default config file, /var/ld/ld.config, and explicitly 
states which libraries should be in the default search path. Be sure to 
always include /usr/lib, or you’ll definitely have issues. If you now 
run just crle again, you’ll see the output:

Configuration file [3]: /var/ld/ld.config
Default Library Path (ELF): /usr/lib:/usr/local/BerkeleyDB/lib
Trusted Directories (ELF): /usr/lib/secure (system default)



- Rick




Hurgh wrote:
> Sorry, forgot to try as the user apache runs as,
>
> I did so, and i got a different result:
>
> ldd /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DB_File/DB_File.so
> libdb-4.4.so <http://libdb-4.4.so> => (file not found)
> libc.so.1 => /lib/libc.so.1
> libm.so.2 => /lib/libm.so.2
>
> which shows that the file is not found.
>
> Where abouts should i set the path's to fix this? Is it in the $PATH 
> vriable or something specific to perl
>
> Thanks
>
> -Hurgh-
>
> On 4/26/06, *Hurgh* <[email protected] <mailto:[email protected]>> wrote:
>
>     Hi Rick,
>
>     Thanks for your reply,
>
>     I ran the command as both root and the cricket user, and both
>     returned the same. The file libdb-4.4.so <http://libdb-4.4.so> is
>     found..
>
>     [cricket@smgnet03 95 0 ~]$ ldd
>     /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DB_File/DB_File.so
>     libdb-4.4.so <http://libdb-4.4.so> =>
>     /usr/local/BerkeleyDB.4.4/lib/libdb- 4.4.so <http://4.4.so>
>     libc.so.1 => /lib/libc.so.1
>     librt.so.1 => /lib/librt.so.1
>     libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
>     libaio.so.1 => /lib/libaio.so.1
>     libmd5.so.1 => /lib/libmd5.so.1
>     libm.so.2 => /lib/libm.so.2
>
>     Any more thoughts?
>
>     Thanks
>
>     -Hurgh-
>
>
>
>     On 4/25/06, *Rick Frey* < [email protected]
>     <mailto:[email protected]>> wrote:
>
>         Appears that libdb-4.4.so <http://libdb-4.4.so> is not in
>         library path or don't have
>         permission to read it as Apache user (or as yourself).
>         Does running `ldd
>         /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DB_File/DB_File.so`
>         as
>         either user show that libdb-4.4.so <http://libdb-4.4.so> is
>         not found?
>
>
>
>


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.