1. EUINC woes on v3.1.1

Hello Readers...

Back again! Got booted off my wife's OS X machine. Now on Linux Xubuntu box with V3.1.1 installed and working. That is to say that ../demo/sanity.ex passes all the tests.

However, in context of a CGI script that I've written and testing, I cannot get EU to use $EUINC which lives both in my .bash_profile and .bashrc files; as well as $EUDIR. ex.err shows that EU is looking for the included file(s) first in the directory where the script resides; then in "euphoria/include". According to ex.err, it seems that the path declared in $EUINC is never checked. Almost as if EU is not aware that $EUINC exists. I could put all the included files in ../cgi-bin/, but I don't want to do that. I could "symlink" euphoria/include to where the $HOME/bin/euphoria/include, but I shouldn't need to do this.

So, is there a bullet-proof way to insure that Euphoria sees $EUINC? Much obliged ...

new topic     » topic index » view message » categorize

2. Re: EUINC woes on v3.1.1

dukester said...

Hello Readers...

Back again! Got booted off my wife's OS X machine. Now on Linux Xubuntu box with V3.1.1 installed and working. That is to say that ../demo/sanity.ex passes all the tests.

However, in context of a CGI script that I've written and testing, I cannot get EU to use $EUINC which lives both in my .bash_profile and .bashrc files; as well as $EUDIR. ex.err shows that EU is looking for the included file(s) first in the directory where the script resides; then in "euphoria/include". According to ex.err, it seems that the path declared in $EUINC is never checked. Almost as if EU is not aware that $EUINC exists. I could put all the included files in ../cgi-bin/, but I don't want to do that. I could "symlink" euphoria/include to where the $HOME/bin/euphoria/include, but I shouldn't need to do this.

So, is there a bullet-proof way to insure that Euphoria sees $EUINC? Much obliged ...

Apache will generally unset any environment variables before running a CGI script. This is a security measure. Most other web servers do the same thing.

For Apache, you can either set EUDIR and EUINC manually in your apache configuration with SetEnv or specify to Apache to allow these to be inherited via PassEnv.

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

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

3. Re: EUINC woes on v3.1.1

jimcbrown said...

Apache will generally unset any environment variables before running a CGI script. This is a security measure. Most other web servers do the same thing.

For Apache, you can either set EUDIR and EUINC manually in your apache configuration with SetEnv or specify to Apache to allow these to be inherited via PassEnv.

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

That's it! I haven't tried it yet, cuz I'm reading your reply for the first time - but that's GOTTA be it! I'm almost sure that i tried everything else. :D Much obliged!

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

4. Re: EUINC woes on v3.1.1

If you plan to update to 4.0 when it's released, you can do this quite a bit easier by having a eu.cfg file in the same directory as your application. It can be as simple as:

-i /path/to/inclues 

This, however, is a 4.0 addition. It could also exist in many common directories such as /etc, which would then be applied globally. You wouldn't have to worry about EUINC at all then. Same with EUDIR. Just looking to the future smile

Jeremy

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

5. Re: EUINC woes on v3.1.1

dukester said...

However, in context of a CGI script that I've written and testing, I cannot get EU to use $EUINC which lives both in my .bash_profile and .bashrc files... So, is there a bullet-proof way to insure that Euphoria sees $EUINC?

Your server (Apache?) is its own user. It doesn't run under your account. So, your environment vars aren't necessarily its environment vars. At least, that's how it is for me.

Using 4.0, this is easy to get around with the eu.cfg file. :)

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

6. Re: EUINC woes on v3.1.1

@jimcbrown

Worked like a charm! Thanks a bunch! BTW, I'm using Hiawatha as my webserver, and sure enough it has a option in the Virtual Section of its config file to turn on one or more Environment Variables. I turned on EUINC and "JOY TO THE WORLD! ... " :)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu