LD_LIBRARY_PATH for cgi

software development

#1

I’m trying to run a Python CGI script that needs to load various .so files. I set my LD_LIBRARY_PATH in .bash_profile, but apparently this environment variable is missing when the CGI is run by the web server. I then tried adding a SetEnv line to my .htaccess setting the LD_LIBRARY_PATH, but the same problem occurs.

Is there any way to successfully set the library path when the CGI script runs?