Nope, that's not it.  I'm already using the second form, which should be
correct.  The key to understanding this problem is this:  the problem
occurs whether it's invoked by Apache or directly;  i.e., it's not an
Apache problem.  Ignore the fact that the script is intended to be run
from a web server;  I've verified that Apache is doing the right thing
in invocation.  Take a look at the following

    foo11> ls -aglF
    < ...snip ...>
    -rwxr-xr-x    1    nobody    nobody        3850    Jan 18 22:24
test-cgi.r*

If I run the script from the shell by invoking it directly, I obtain the
following

    foo12> ./test-cgi.r
    Finger protocol loaded
    Whois protocol loaded
    ...
    <script output>
    >>

(note that the last prompt in that is the Rebol REPL prompt, not the
shell prompt) whereas if I invoke the interpreter, passing the args and
script name, I get the expected results

    foo13> /usr/local/bin/rebol -cs ./test-cgi.r
    <script output>
    foo14>

So it seems as though the Rebol interpreter isn't seeing the -cs
argument on the shell magic line when it gets invoked directly, as in
the first case.  This behavior is consistent across all "by the book"
formulations of that argument list, namely "--cgi -s" and "-cs."  I.e.,
the first line of the file "test-cgi.r" in the above examples is

    #!/usr/local/bin/rebol -cs

...which should be correct according to the documentation, if I
understand it correctly.  Note too that other shell scripts which take
arguments to their interpreters on the first line of the file, for
instance debugging flags and such, work properly in my environment.  I
find it really suspicious that nobody else has run into a similar
problem;  this leads me to suspect something in the interface between
Rebol and my environment.  Anyone else running similar versions of Rebol
and Linux?

Aside:  any Rebol script file I run that starts with
"#!/usr/local/bin/rebol" with no arguments causes the interpreter to
simply startup and be initialized and the script itself is ignored.
Tres bizarre.

jb


[EMAIL PROTECTED] wrote:

> My guess is you're using Apache. Try
>
> #! /usr/local/bin/rebol --cs
>
> (or was it
> #! /usr/local/bin/rebol -cs
>
> ?)
>
> ;- Elan >> [: - )]

Reply via email to