[REBOL] Re: Simple cgi problem/Windows?
From: tim::johnsons-web::com at: 2-Jan-2002 7:33
* Mike Ickes <[mwickes--verticalmicros--com]> [020102 04:45]:
> If you are on a Unix/Linux server make sure to chmod +x <your script name here>
> This makes sure your script is sent as an executable by the web server...
Mike is correct.... but see add't comments below
> HTH!
>
> Mike
>
> At 03:50 AM 1/2/02, you wrote:
> >Happy New Years everybody!
> >
> >How would you like to start the year off with a nice easy (I hope) to
> >solve problem? Just what you needed, right? I am trying to learn how to
> >use cgi scripts. Here is my script:
> >
> >#!/www/rebol/rebol.exe --cgi --script
Is this script running one windows? If so, a couple of
comments: (disclaimer: don't do "Windows" that much currently)
1)I recommend the executable NOT be in the webserver folder area,
how about ....\program files\rebol or even C:\rebol?
2)I believe that you need to modify the registry as follows:
Add a new string value to:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3Svc\Parameters\Script Map
with name of
.r
and data value of
c:\rebol\rebol.exe -cs %s
; or wherever you choose to put the executable (see caveat above)
; scripts should run in \scripts or \cgi-bin and below
Let me know how that works for you
Tim
> >rebol []
> >print {Content-Type: text/html^/^/}
> >x: 5 * 8
> >print x
> >print {Hi Everybody!}
> >
> >If I do this script from the rebol command line, it prints:
> >
> >Content-Type: text/html
> >
> >
> >40
> >Hi Everybody!
> > >>
> >
> >So, I assume that the script is able to find the rebol interpreter.
> >
> >But if I load it into a browser it tries to download the file. Why
> >doesn't it run the script?
> >
> >Louis
> >
> >
> >--
> >To unsubscribe from this list, please send an email to
> >[rebol-request--rebol--com] with "unsubscribe" in the subject, without the quotes.
>
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.johnsons-web.com