[REBOL] Re: [REBOL]Re:Trying to get Rebol CGI working on my website
From: petr:krenzelok:trz:cz at: 22-Mar-2003 14:17
Dave Fobare wrote:
> I'm back!
>
> I just got a message from a tech at ReadyHosting.com, my Win2K host.
> Short and sweet he tells me:
>
> "03/21/03 - Rebol031.exe installed on 63.119.175.55 for
> the-sports-page.com."
>
> Sooooo......, I try to execute the "hello, world" example --- now.cgi.
> Here is what comes back to my browser:
>
> Bareword found where operator expected at
> d:\html\users\the-sports-pagecom\html\cgi-bin\now.cgi line 5, near
> ""Date/time is:" now"
> (Missing operator before now?)
> syntax error at d:\html\users\the-sports-pagecom\html\cgi-bin\now.cgi
> line 2, near "REBOL ["
> Search pattern not terminated at
> d:\html\users\the-sports-pagecom\html\cgi-bin\now.cgi line 6.
Try putting REBOL [] header on one line and experiment with line
terminators ... e.g. I was NOT able to run any cgi script on our linux
server, unless I logged to console, manually edited the script an did
some enters, removing Windows line terminators or so ... this kind of
issues were so frustrating, that sometimes I thought that I will not use
rebol, and that is something - because I am strong rebol followers :-)
New CGI related doc on RT's site suggest something similar - be sure to
upload in ASCII mode, not binary one + if you have account at your
server, log-in, run rebol, read and save the script ...
> The "shebang" line looks as though it is being ignored -- I've done
> all sorts of things to it(including eliminating it) and still get the
> same message. Yet why do my perl scripts work ok? Don't get it. Is the
> above really a Perl error message? I want to get my ducks in a row
> before I write back to him.
Well, I am far from being expert in CGI area, but is there anything like
perl CGI
or so at all? I mean - CGI is just "common gateway interface"
and should read in your script, look at the #! .... directive and call
particular executable .... it should not care if the executable is C,
Perl, Python, Rebol, whatever kind of app. It then passes rest of the
script to such application ...
Registering .pl, .r etc extension in apache config file is just for you
to enable you to name your scripts e.g. now.r, instead of now.cgi.
Of course your directory has to be enabled to run cgi scripts:
<Directory "c:/ms-intranet/cgi-bin/">
Options ExecCGI
AllowOverride None
order allow,deny
allow from all
</Directory>
I think that the only difference could be, if such directives as above
would contain something like "SetHandler perl-script" or so - in such
case I think that your cgi directory would be registered for early phase
Perl module execution ... but then I am still talking about Apache,
maybe IIS is completly different beast ....
-pekr-