------art_111933_15338783.1153427388618
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 7/20/06, Coey Minear <cminear / securecomputing.com> wrote:
>
>
> > I've tried adding:
> >
> > SetEnv LD_LIBRARY_PATH /path/to/lib
> >
> > in a .htaccess file, but to no avail. Perl, however, happily recognizes
> it.
> > Setting ENV['LD_LIBRARY_PATH'] does not take effect either.
> >
>
> I set this in Apache's httpd.conf file, in the <VirtualHost>
> declaration.  You will also want to make sure you declare all the
> libraries needed.  If you just declare "/path/to/lib", the libraries
> wouldn't necessarily know where to find libraries in /usr/lib, for
> example.  Here is the line I used (on my Solaris system):
>   SetEnv LD_LIBRARY_PATH
> /usr/lib:/usr/local/lib:/usr/openwin/lib:/usr/local/pgsql/lib


Unfortunately, I'm in a very restrictive environment, for multiple reasons.
There are no vhosts, and custom configuration directives must either be in
.htaccess or a <Directory> stanza. It's my understanding that .htaccess
would have the same effect as setting it in <Directory>, though.
Furthermore, when I run a Perl fcgi script to dump $ENV, I see the SetEnv
value:

LD_LIBRARY_PATH /path/to/fcgi_bin/lib


> Strangely, when I execute the fcgi script from the command line, as:
> >
> > $ LD_LIBRARY_PATHath/to/lib ./index/fcgi
> >
> > I receive:
> >
> > ./index.fcgi:25: undefined method `each_cgi' for FCGI:Class
> (NoMethodError)
>
> Are you sure you've installed FastCGI on this system?  Based on what I
> see in the log file:
>   1) The server cannot find libfcgi.so.0, which is installed with
> FastCGI.  Make sure the file is present.
>   2) You've probably installed ruby-fcgi since it knew about
> FCGI:Class, but the fcgi.so file would require the libfcgi.so library.
> Did you copy the ruby libraries over, but not the system libraries?



FastCGI is installed, but not in the typical fashion.  I have the FastCGI
libraries, libfcgi.so.0, etc installed in a user directory, which is why I'm
trying to set LD_LIBRARY_PATH, so Ruby will look for the libraries in the
right place. And no, I cannot install into the system library (/usr/lib).

Thanks for the help,
--chris

------art_111933_15338783.1153427388618--