1. EUINC woes on v3.1.1
- Posted by dukester Dec 05, 2010
- 1263 views
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 ...
2. Re: EUINC woes on v3.1.1
- Posted by jimcbrown (admin) Dec 05, 2010
- 1407 views
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.
3. Re: EUINC woes on v3.1.1
- Posted by dukester Dec 05, 2010
- 1300 views
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.
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!
4. Re: EUINC woes on v3.1.1
- Posted by jeremy (admin) Dec 05, 2010
- 1259 views
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
Jeremy
5. Re: EUINC woes on v3.1.1
- Posted by euphoric (admin) Dec 05, 2010
- 1236 views
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. :)
6. Re: EUINC woes on v3.1.1
- Posted by dukester Dec 05, 2010
- 1257 views
@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! ... " :)