Apache: CGI application end environment variable
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Web Servers on Unix and Linux > Apache: CGI application end environment variable




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Apache: CGI application end environment variable  
blpp


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-03-05 07:47 AM

Hello NG,

I have an Apache web server 2.0.46 running on my RedHat Enterprise
Linux 3 WS running. I want to execute an CGI application written in
c++. This application needs a correct set environment variable
(LD_LIBRARY_PATH) because it creates a Java virtual machine and
therefore needs some Java librarys from the path
/usr/java/j2re1.4.2_06/lib/i386. In order to get it work I added a
SetEnv command to the httpd.conf:

SetEnv LD_LIBRARY_PATH /usr/java/j2re1.4.2_06/lib/i386

My application runs fine and I can see the environment variable.

If my CGI application itself now calls another application via system
oder execv command this second app doesn't have the environment
variable set. Using getenv I can't see the variable ...

Does the web server prevent the correct environment variables passing
to the second app?


Regards

Mario Freimann





[ Post a follow-up to this message ]



    Re: Apache: CGI application end environment variable  
blpp


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-04-05 07:47 AM

Solved the problem myself. The problem was a set "user id on
execution" bit on the second app. Because this was set the linker
ld.so didn't use the variable LD_LIBRARY_PATH and the second app
couldn't be started at all.


Regards

Mario Freimann





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:08 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register