swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with a CGI script


From: John Carnahan
Subject: Re: Problems with a CGI script
Date: Tue, 28 Jul 1998 12:11:42 -0700 (PDT)

Benedikt,

> 
> I tried your idea and still couldn't get it to work. Then after fiddling 
> around
> for a few more hours I hit upon calling the Swarm program with a line like 
> this
> in the Perl program:
> 
> system "/bin/bash -c '(export HOME=$home\;$run/$program -b)'\;";
> 
> Here $home is the home directory of the user nobody, $run is the directory
> where the Swarm executable is stored and $program is the name of the program.
> This works, because I spawn a new bash shell and export the HOME env variable
> within the subshell.
> 

Perhaps a better way to do things is with Apache 'SetEnv' directives. In
this way you can send along any env vars of your choosing along to CGI
scripts. You can place these directives in one of the conf files or in a
htaccess file.


John 


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]