I am running Windows NT 4.0 (I believe with SP5) with Rebol/Core
2.2.0.3.1 (which is the latest version as far as I can tell) and
Apache 1.3.9.

My goal is to get Rebol running with Apache and CGI. (I figure I
should be able to CGI working first before I move on to anything
more advanced.)

If anyone has an NT 4.0 / Apache / Rebol setup running and can
provide some help, I would appreciate it!

My script (sample.r) looks like this:

    #!e:\rebol\rebol.exe --cgi
    REBOL []

    print "Content-Type: text/plain^/"
    print ["Welcome to my time and date page!"
           " The time and date is" now]

If I run the program using the command "e:\rebol\rebol.exe
sample.r", the Rebol console opens and the script output is
display (good).

If I run the program using the command "e:\rebol\rebol.exe --cgi
sample.r", the Rebol console doesn't open (good) but there is no
output to the CMD.EXE console (bad).

Based on one of the e-mails in this list, I tried "e:\rebol
rebol.exe --cgi sample.r | more". This gives me output to the
CMD.EXE console (good).

I'm assuming I need to get the "" version working before I have a
chance of getting Apache CGI working.

I have a second problem...

When I bring up http://server/cgi-bin/sample.r in the browser I
get an error:

    Internal Server Error
    The server encountered an internal error or misconfiguration
    and was unable to complete your request.

The error log says:

    (2)No such file or directory: couldn't spawn child process:
    e:/program files/apache group/apache/cgi-bin/sample.r

If I cut and paste that pathname to the CMD.EXE window and change
the forward slashes to back slashes and put quotes around the
whole thing, I can do a DIR on it and see the file exists.

I have set up the file associations as follows:

    E:\>assoc .r
    .r=rfile
    E:\>ftype rfile
    rfile=e:\rebol\rebol.exe --cgi "%1" %*

If I remove the --cgi from the above command and type "sample.r"
in the CMD.EXE window, the Rebol script runs in a Rebol window as
expected. If I put the --cgi back in and type "sample.r" in the
CMD.EXE window, I get the behavior I mentioned above where the
output doesn't show up.

Now, it seems from the error log that there is something else
wrong with my configuration such that, even if I get the script
output to appear, Apache still won't run the script. I can put
Perl scripts in the cgi-bin directory and they work in the
browser.

Thanks for any help!

/jonathan

Reply via email to