1. Passing Parameters from Apache to Eu Interpreter

I'm trying to tell my Euphoria-MVC script to use "with warning" when I run from console/debug/IDE, but "without warning" when Apache runs it. I've set it up like this in my script:

#!C:\euphoria41-64bit\bin\eui.exe -batch 
 
ifdef NOWARN then 
	without warning 
else 
	with warning 
end ifdef 

Basically, I want to keep output to error.log and access.log to a minimum, and let the errors go to ex.err.

Is there a way to tell Apache to use a command line parameter ("-NOWARN") when calling my script? I Googled for an answer but found nothing addressing this.

Is this a reasonable approach, or am I fouling something up?

new topic     » topic index » view message » categorize

2. Re: Passing Parameters from Apache to Eu Interpreter

I would just hoist the option up one level:

-- apache.exu 
without warning 
include main.e 

and

-- dev.exu 
with warning 
include main.e 

I would also expect #!C:\euphoria41-64bit\bin\eui.exe -batch to be different on deployed/uploaded vs local/development?

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

3. Re: Passing Parameters from Apache to Eu Interpreter

petelomax said...

I would just hoist the option up one level:

-- apache.exu 
without warning 
include main.e 

and

-- dev.exu 
with warning 
include main.e 

I would also expect #!C:\euphoria41-64bit\bin\eui.exe -batch to be different on deployed/uploaded vs local/development?

Let's see if I'm parsing this correctly:

By "hoisting up one level," you're suggesting I run apache.exu on production and dev.exu on dev, each of which calls the main app?

That got me thinking that, as well, maybe I could also specify in my Apache httpd.conf which particular executable to run, since .htaccess is not shared.

Thank you!

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

4. Re: Passing Parameters from Apache to Eu Interpreter

You can put defines in your eu.cfg, so put that in your development directory but leave it out of prod.

[all] 
-i ./include 
-D DEBUG 

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu