Setting LD_LIBRARY_PATH in Apache PassEnv/SetEnv still cant find library

Posted by DoMoreASAP on Stack Overflow See other posts from Stack Overflow or by DoMoreASAP
Published on 2010-03-31T04:31:18Z Indexed on 2010/03/31 4:33 UTC
Read the original article Hit count: 517

I am trying to test the Cybersource 3d party implementation. I was able to get the test files running fine from the command line, which requires that on Linux I export the path to the payment libraries to LD_LIBRARY_PATH.

to try to test this on my server I have created the apache config below

<VirtualHost 127.0.0.1:12345>
  AddHandler cgi-script .cgi
  AddHandler fcgid-script .php .fcgi
  FCGIWrapper /my/path/to/php_fcgi/bin/php-cgi .php
  AddType text/html .shtml
  AddOutputFilter INCLUDES .shtml
  DocumentRoot /my/path/to/cybersource/simapi-php-5.0.1/
  ProxyPreserveHost on

  <Directory /my/path/to/cybersource/simapi-php-5.0.1>
    SetEnv LD_LIBRARY_PATH /my/path/to/cybersource/LinkedLibraries/lib/
    AllowOverride all
    Options +Indexes
    IndexOptions Charset=UTF-8
  </Directory>
</VirtualHost>

I have set the env variable there with SetEnv command, which seems to be working when i run a page that prints

<?php phpinfo(); ?>

however the test script when called through the browser still wont work, apache says:

tail /my/apache/error_log 
[Tue Mar 30 23:11:46 2010] [notice] mod_fcgid: call /my/path/to/cybersource/index.php with wrapper /my/path/to/cybersource/php_fcgi/bin/php-cgi
PHP Warning:  PHP Startup: Unable to load dynamic library '/my/path/to/cybersource/extensionsdir/php5_cybersource.so' - libspapache.so: cannot open shared object file: No such file or directory in Unknown on line 0

so it cant find the linked file libspapache.so even though it is in the LD_LIBRARY_PATH that is supposedly defined

i really appreciate the help. thanks so much.

© Stack Overflow or respective owner

Related posts about php

Related posts about setenv