1. Euphoria as script language for IIS

Has anyone had success using Euphoria as a scripting language running
under IIS? I thought that all I had to do was create a .EX file that
output valid HTML to stdout.

Here is the program I'm trying ...
without warning
puts(1,
      "Content-type: text/HTML\n\n" &
      "<html><head>\n" &
      "<title>Sample Title</title>\n" &
      "</head>\n" & 
      
      "<body text=blue>\n" &
      "<H1 align=center>Sample Header</H1>\n" & 
      "<TABLE BORDER=1 BGCOLOR=pink>\n" & 
      "<tr><td>Col One</td>\n" &
          "<td>Col two</td>\n" &
          "<td>Col Three</td>\n" &
      "</tr>" & 
      "<tr BGCOLOR=cyan><td>ABC</td>\n" &
          "<td>def</td>\n" &
          "<td>qwerty</td>\n" &
      "</tr>" & 
      "</table>\n" &
      "</body>"          
     )


This is placed in the INetPub\Scripts folder as "t1.exs". 
I have 'exwc' as the associated program for the "exs" file type.
In my browser I type in "http://localhost/scripts/t1.exs"

The output in the browser a listing of the program as if it was 
a text file. It doesn't run the Euphoria program.

What am I missing? 

-- 
Derek Parnell
Melbourne, Australia

new topic     » topic index » view message » categorize

2. Re: Euphoria as script language for IIS

Derek Parnell wrote:
> 
> Has anyone had success using Euphoria as a scripting language running
> under IIS?

Yes. I used to have my system set up like that at work. I use Apache now,
so my IIS+Euphoria knowledge has been filed away... too well, some would say.

> I thought that all I had to do was create a .EX file that
> output valid HTML to stdout.

Have you got a service set up in the Internet Information
Services app thingie (Start>Control Panel>Administrative Tools>Internet
Information Services)? I see my old one there. You can get properties on it
and set up home directory, default pages, etc...

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

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

3. Re: Euphoria as script language for IIS

cklester wrote:
> 
> Derek Parnell wrote:
> > 
> > Has anyone had success using Euphoria as a scripting language running
> > under IIS?
> 
> Yes. I used to have my system set up like that at work. I use Apache now,
> so my IIS+Euphoria knowledge has been filed away... too well, some would say.
> 
> > I thought that all I had to do was create a .EX file that
> > output valid HTML to stdout.
> 
> Have you got a service set up in the Internet Information
> Services app thingie (Start>Control Panel>Administrative Tools>Internet
> Information Services)? I see my old one there. You can get properties on it
> and set up home directory, default pages, etc...

Yes, the IIS is running and it delivers pages from localhost to the browsers.

I just can't work out how to tell it to run the Euphoria interpreter when
the URL is a Euphoria source code file.

-- 
Derek Parnell
Melbourne, Australia

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

4. Re: Euphoria as script language for IIS

On Wed, 22 Dec 2004 14:32:43 -0800, Derek Parnell
<guest at rapideuphoria.com> wrote:
> Yes, the IIS is running and it delivers pages from localhost to the browsers.
> 
> I just can't work out how to tell it to run the Euphoria interpreter when
> the URL is a Euphoria source code file.

That's a page setting of some kind: It defaults to text mode for
unknown extensions, etc...

I think it's an IIS setting you need to change.

Sorry, can't help beyond that.
-- 
MrTrick

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

5. Re: Euphoria as script language for IIS

Derek Parnell wrote:
> 
> 
> Yes, the IIS is running and it delivers pages from localhost to the browsers.
> 
> I just can't work out how to tell it to run the Euphoria interpreter when
> the URL is a Euphoria source code file.

On the "Home Directory" tab, I've got "Execute Permissions" set to "Scripts
Only." There's a button on there for "Configuration..." Clicking that brings
up a "Mappings" tab, where you can specify mappings. Done that yet?

Mine shows

Extension: .esp
Executable Path: C:\EUPHORIA\BIN\EXW.EXE %s %s
Verbs: All

(Just tryin' to cover all bases...)

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

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

6. Re: Euphoria as script language for IIS

cklester wrote:
> 
> Derek Parnell wrote:
> > 
> > 
> > Yes, the IIS is running and it delivers pages from localhost to the
> > browsers.
> > 
> > I just can't work out how to tell it to run the Euphoria interpreter when
> > the URL is a Euphoria source code file.
> 
> On the "Home Directory" tab, I've got "Execute Permissions" set to "Scripts
> Only." There's a button on there for "Configuration..." Clicking that brings
> up a "Mappings" tab, where you can specify mappings. Done that yet?
> 
> Mine shows
> 
> Extension: .esp
> Executable Path: C:\EUPHORIA\BIN\EXW.EXE %s %s
> Verbs: All
> 
> (Just tryin' to cover all bases...)

Thanks. This was the missing key. I had ...

Extension: .exs
Executable Path: C:\EUPHORIA\BIN\EXW.EXE
Verbs: All

So I added the '%s %s' and now it works! Weird though, I then removed them 
and it still works! Might be cached somewhere. Anyhow, things are fine now.

Thanks for all the advice, people. 

-- 
Derek Parnell
Melbourne, Australia

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

7. Re: Euphoria as script language for IIS

Derek, i believe you might be missing telling the computer that .exs is file
that needs to be executed by .exw (not .exwc, see below). and, .exs needs to be
associated with its executable.

for example, unless i have the environmental variable PATHEXT set with .exw
added -- "PATHEXT .com;.exe;.bat;.cmd;.exw" -- my web pages will not execute.
PATHEXT is the variable that tells your computer which extensions are executable.
it can be set in the registry, but this environmental variable is sufficient.

also, .exwc is the console version of .exw, and i don't think calling up a
console from a web page is a good idea or possible.

i'm sure that IIS allows Perl scripts to run, so Euphoria should not be a
problem. but, in the registry or in the environment, the computer must be told
what is an executable extension.

html-ly,


--
jon

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

8. Re: Euphoria as script language for IIS

Derek,

i see you solved your problem after i posted. great.

i should mention that i don't run IIS, and perhaps it is a little different. but
to run Euphoria on 3rd party web servers (not Apache) that's what i found works
with Win2kPro (and XP).

tardy-ly,


--
jon

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

Search



Quick Links

User menu

Not signed in.

Misc Menu