1. Windows guy lost on Linux System! Setting EUDIR

How do I set EUDIR on a Linux server with Apache Web Server - i.e. remotely from
my Windows system. Through .htaccess or system calls?

Thanks,
 Alex

PS I am trying to bind my file remotely

new topic     » topic index » view message » categorize

2. Re: Windows guy lost on Linux System! Setting EUDIR

Alex Chamberlain wrote:

> How do I set EUDIR on a Linux server with Apache Web Server - i.e. remotely
> from my Windows system. Through .htaccess or system calls?

I want to know this, too! :)

Actually, I want to know how to do it so I can move all my Euphoria include
files to one central location and not have to put them in each and every folder
where I have CGI programs.

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Windows guy lost on Linux System! Setting EUDIR

If you can access /etc on the server from your windows machine, you can just
set EUDIR in the /etc/profile file.

Later, 
Jeremy Peterson

Life is real, games are for fun.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Windows guy lost on Linux System! Setting EUDIR

> How do I set EUDIR on a Linux server with Apache Web Server - i.e. remote=
ly from my Windows system. Through .htaccess or system calls?

You'll need to edit your .bash_profile script in your home directory.
Add these lines:

EUDIR=/home/myname/euphoria
EUINC=$EUDIR/include
PATH=$PATH:$EUDIR/bin
export EUDIR EUINC PATH

(replace myname with your user name)

> PS I am trying to bind my file remotely

Good luck! I don't see any issues as binding is done on the command
line. I'm assuming you're SSH-ed into the box, correct?

~Greg

new topic     » goto parent     » topic index » view message » categorize

5. Re: Windows guy lost on Linux System! Setting EUDIR

Greg Haberek wrote:
> 
> > How do I set EUDIR on a Linux server with Apache Web Server - i.e. remote=
> > ly from my Windows system. Through .htaccess or system calls?
> 
> You'll need to edit your .bash_profile script in your home directory.
> Add these lines:
> 
> EUDIR=/home/myname/euphoria
> EUINC=$EUDIR/include
> PATH=$PATH:$EUDIR/bin
> export EUDIR EUINC PATH

Greg, correct me if I'm wrong, but in the case of Apache running Euphoria
CGI scripts, it will be in its own user space and, therefore, anything I
set beforehand in my user space won't work. I probably don't have access to
the user profile under which Apache is run, so there's gotta be something
in the .htaccess file for this, or another settings file. I'll check, but you
let me know if I'm totally off base.

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

6. Re: Windows guy lost on Linux System! Setting EUDIR

I checked out www.apache.org and you can (supposidly) set env vars, but I can
only access .htaccess and thats not implemented until 1.7 and my host is running
1.3.33!

Can it be sorted through system() calls?

Thanks,
 Alex

new topic     » goto parent     » topic index » view message » categorize

7. Re: Windows guy lost on Linux System! Setting EUDIR

Solved???

#!./exu

puts(1, "Content-type: text/plain\n\n")

include file.e

system("env EUDIR=\"" & current_dir() & "\" ./backendu bind.il -quiet -out eusp
EuSP.ex > bind.out 2> bind.err", 2)


Note: to bind bandendu has to be in a bin directory under the current one!

Chers,
 Alex

new topic     » goto parent     » topic index » view message » categorize

8. Re: Windows guy lost on Linux System! Setting EUDIR

> Greg, correct me if I'm wrong, but in the case of Apache running Euphoria
> CGI scripts, it will be in its own user space and, therefore, anything I
> set beforehand in my user space won't work. I probably don't have access =
to
> the user profile under which Apache is run, so there's gotta be something
> in the .htaccess file for this, or another settings file. I'll check, but=
 you
> let me know if I'm totally off base.

Choose your weapon:
  Apache 1.3: http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv
  Apache 2.0: http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv

HTH,
~Greg

new topic     » goto parent     » topic index » view message » categorize

9. Re: Windows guy lost on Linux System! Setting EUDIR

Greg Haberek wrote:

>   Apache 1.3: <a
>   href="http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv">http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv</a>
>   Apache 2.0: <a
>   href="http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv">http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv</a>

This page: http://httpd.apache.org/docs/1.3/env.html

Says this: "If you wish to manipulate the operating system environment under
which the server itself runs, you must use the standard environment
manipulation mechanisms provided by your operating system shell."

Does that need to be done, or will doing what you suggested work? I don't
think so because the Euphoria interpreter would need to be started before
the CGI could run; the system() call wouldn't happen until it was too late,
right?

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

10. Re: Windows guy lost on Linux System! Setting EUDIR

> Says this: "If you wish to manipulate the operating system environment un=
der
> which the server itself runs, you must use the standard environment
> manipulation mechanisms provided by your operating system shell."
>
> Does that need to be done, or will doing what you suggested work? I don't
> think so because the Euphoria interpreter would need to be started before
> the CGI could run; the system() call wouldn't happen until it was too lat=
e,
> right?

Huh? No, no, no... They mean if you wanted to *SET* an environment
variable (i.e. manipulate) in the shell, you'd need to use system().
You're not trying to reset a shell environment variable, just read it.

Think of it in terms of variable scope: a shell envronment variable
(PATH, EUDIR) is globally available at the top-level, but a variable
set with SetEnv is local only to that CGI script. Get it?

~Greg

new topic     » goto parent     » topic index » view message » categorize

11. Re: Windows guy lost on Linux System! Setting EUDIR

Greg Haberek wrote:
> 
> Think of it in terms of variable scope: a shell envronment variable
> (PATH, EUDIR) is globally available at the top-level, but a variable
> set with SetEnv is local only to that CGI script. Get it?

Yes, and if what you say is true, and the implications play out as expected,
I'll have to buy somebody a [insert favorite beverage here]!!! 8)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu