开发者

Setting LD_LIBRARY_PATH in Apache PassEnv/SetEnv still cant find library

开发者 https://www.devze.com 2022-12-25 18:30 出处:网络
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 librarie

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.


SetEnv is a per-request thing, so it doesn't affect the context that the FCGIWrapper runs under. You want to use FcgidInitialEnv or FcgidCmdOptions to set variables in the environment of the wrapper.

0

精彩评论

暂无评论...
验证码 换一张
取 消