Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Trying to get Rebol CGI working on my website

 [1/47] from: editor:the-sports-page at: 16-Mar-2003 21:15


I decided after reading about the new Rebol CGI page mentioned on the mailing list to try and get Rebol CGI working on my win2K host(ReadyHosting). After following the instructions on the aforementioned webpage, the following error message was generated trying to execute "now.cgi": PerlIS does not support shelling (Execvp) at d:\html\users\mysitesnamecom\html\cgi-bin\now.cgi line 1 Any ideas? And no, I don't want to switch to a Unix host. ;) Dave Fobare

 [2/47] from: gscottjones:mchsi at: 17-Mar-2003 5:45


From: "Dave Fobare"
> I decided after reading about the new Rebol CGI page > mentioned on the mailing list to try and get Rebol CGI
<<quoted lines omitted: 5>>
> d:\html\users\mysitesnamecom\html\cgi-bin\now.cgi line 1" > Any ideas? And no, I don't want to switch to a Unix host. ;)
Hi, Dave, Looking at ReadyHosting.com's support pages and at your error message, I am guessing that the script is being run through Perl. It appears as though only .pl and .cgi extensions are accepted and that these scripts are more tightly bound to perl. I don't know what web server is being used for your hosted site, but the main site is running "Microsoft-IIS/5.0 on Windows 2000" according to netcraft.com. Does this seem right? Does anyone know how to "encourage" IIS to run additional cgi scripts through an added in scripting exe? I am guessing that you may not be successful, but lets see if someone knows IIS well enough to help you further. --Scott Jones

 [3/47] from: editor:the-sports-page at: 17-Mar-2003 7:42


Scott, Scott, I made sure to mention that ReadyHosting is a Win2K hosting service. They are just about the cheapest such host around. I run some ColdFusion(which RH supports) stuff and don't have the Perl skills to translate. I put in a request for *explicit* Rebol support to the support staff; I expect a negative answer sometime today. If anybody knows of a way this can be done without the need for cooperation from ReadyHosting I'd be much obliged. Thanks, Dave Fobare At 05:45 AM 3/17/03 -0600, you wrote:

 [4/47] from: yeksoon::myrealbox::com at: 17-Mar-2003 21:01


At 05:45 AM 17-03-03 -0600, you wrote: Does anyone know how to "encourage" IIS to run additional cgi scripts through an added in scripting exe? I have not use IIS for a long time. But here is a wild guess. Windows generally uses the registry for mapping to extension. Try looking for something as follows under "regedit": HKEY_LOCAL_MACHINE System CurrentControlSet Services W3Svc Parameters Script_Map Once there you wantto EDIT --> New --> String Value to add a new extension association of ".cgi" Then MODIFY the new ".cgi" entry to associated it with the rebol executable, eg "C:\rebol\rebol.exe %s %s" Here "C:\rebol\" may be different on your system and note that you must end with .exe. Now restart the computer to get the new setting. After that any script in a directory that the server sees as EXECUTABLE (eg, the default "scripts" directory) which ends in *.cgi will be sent to the rebol interpreter. Best YekSoon, keeping my fingers crossed.

 [5/47] from: gscottjones:mchsi at: 17-Mar-2003 7:17


Hi, Dave, From: "Dave Fobare"
> I made sure to mention that ReadyHosting is a Win2K hosting service.
... Yes, you did specifically mention Win2K. The reason I used netcraft.com was to find the actual web serving software that is being run in the Win2K environment. Knowing the web serving software is crucial to helping you discover a solution to your problem. I am guessing that it was more obvious to you than it was to me that it was running IIS. :)
> If anybody knows of a way this can be done without the need for > cooperation from ReadyHosting I'd be much obliged.
It sounds like you are thinking the same thing. Best wishes, --Scott Jones

 [6/47] from: al:bri:xtra at: 18-Mar-2003 17:19


Yek Soon wrote:
> Does anyone know how to "encourage" IIS to run additional cgi scripts > through an added in scripting exe?
<<quoted lines omitted: 10>>
> Now restart the computer to get the new setting. > After that any script in a directory that the server sees as EXECUTABLE
(eg,
> the default "scripts" directory) which ends in *.cgi will be sent to the > rebol interpreter.
I've been using Rebol CGI with Windows 2000 and IIS for around six months now. This doesn't seem like the way we set up IIS to run Rebol as a CGI process (though it does seem familiar). We got it going a lot easier than this. Unfortunately, I've forgotten how to do it!! I believe there's a tutorial on IIS 5 from the MS help site which shows how to set up generic CGI scripts which was helpful? Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [7/47] from: editor:the-sports-page at: 18-Mar-2003 6:40


Either way, this isn't going to help me as I don't have RegEdit access on my remote host. Dave Fobare

 [8/47] from: tim:johnsons-web at: 18-Mar-2003 7:24


* Dave Fobare <[editor--the-sports-page--com]> [030318 04:58]:
> Either way, this isn't going to help me as I don't have RegEdit access on > my remote host.
Hi Dave: Sorry to hear about your problems... I have followed that cost is an issue and you're getting a break with this ISP. However, if your ISP is not willing to make those changes for you - perhaps you should look for someone else - perhaps a domain hoster. For someone just starting out - 24.95 american $ a month can be a bit steep. Maybe there are others of like mind with whom you can 'share' a domain with to cut your costs. cniweb.net is my domain hoster. You would not have had these problems with Corey. But he is a bit spendy, thus a consideration to some sharing of resources. BTW: I've run rebol CGIs with '.r' extensions reliably on windows boxes with IIS and PWS. It would just mean that the ".cgi" entry in the registry would be replaced with entry title ".r". -tim-
> Dave Fobare > >Yek Soon wrote:
<<quoted lines omitted: 27>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

 [9/47] from: editor:the-sports-page at: 18-Mar-2003 15:58


Tim, My problem is a need to stay with a reasonably priced NT/Win2K host that supports CF. If I were to move to a 'Nix based host, cost would not be a problem at all as 'Nix-based hosts are generally a good deal cheaper than Win2K for the same level of space/traffic/support. I've never had a problem getting Rebol CGI to work on my development boxes(Win98+Apache, or Win2K/IIS/Apache). Dave

 [10/47] from: gscottjones:mchsi at: 18-Mar-2003 16:03


Hi, Dave, I suspect that you are feeling frustrated by now. Since no obvious solutions have popped up, in the spirit of trying to be helpful, I would like to expound a bit on my original answer, and offer a final suggestion. The readhyhosting help pages suggest that scripts ending in .pl or .cgi are automatically run through Perl. Perl sees the first line: #!/home/your-account/rebol -c and thinks you what to run yet another program from a shell. Doing a search on google for the error message that you received shows that PerlIS is an isapi dll version of perl that does not allow shelling (forking). There is a slim chance that IIS may allow an alternate extension *if* it also can pseudo-interpret the shebang (#!) line (this was one of the issues that I simply do not recall). I would suggest one more trial, and this time naming the file with the .r extension (leaving all the other instructions the same as in the tutorial). It will either choke on the name of the extension, saying that this extension is not allowed, or it may choke due to a path or naming problem, which is actually good news. Depending on *exactly* what your first line reads, I might try experiements with the following additional variations: #!d:\html\users\mysitesnamecom\html\cgi-bin\rebol.exe -c #!d:\\html\\users\\mysitesnamecom\\html\\cgi-bin\\rebol.exe -c #!d:/html/users/mysitesnamecom/html/cgi-bin/rebol.exe -c --Scott Jones

 [11/47] from: editor:the-sports-page at: 18-Mar-2003 19:34


Dear Scott, I gave your suggestion a shot, but all attempts with the .r extension ended up with the source of the file being pushed to the browser as if it were a .txt file. I'm still waiting on an answer from ReadyHosting, and will post the answer. Thanks, Dave Fobare

 [12/47] from: louisaturk:coxinet at: 19-Mar-2003 2:06


Hi Dave, I don't know if this will be of any help to you at all, but the following line works for me on win2k server. #! c:\rebol\rebol.exe -cs and I use the .r extension when naming my cgi files. Louis At 09:15 PM 3/16/2003 -0600, you wrote:

 [13/47] from: bry:itnisk at: 19-Mar-2003 9:28


>I gave your suggestion a shot, but all attempts with the .r extension
ended
>up with the source of the file being pushed to the browser as if it
were a
>.txt file.
There was a thread on this subject, or at least a similar situation - not sure if your problem is exactly the same although it sounds like it - a while back, entitled [REBOL] Re: MS Internet Explorer, View and CGI , resolved by pat665 with the text:

 [14/47] from: dominique:microplus at: 19-Mar-2003 9:47


Hi, I can confirm I have exactly the same problem (Apache and Windows NT) (...file being pushed to the browser as if it were a .txt file.) I didn't find any workaround. With apache and linux the same scripts are working well. I only have the problem that the banner appears (argument -q is ignored) -- dom

 [15/47] from: petr:krenzelok:trz:cz at: 19-Mar-2003 10:52


Ohlsson, Dominique wrote:
>Hi, > >I can confirm I have exactly the same problem (Apache and Windows NT) >(...file being pushed to the browser as if it were a .txt file.) >
Strange - I have Apache 2.0 + Rebol cgi on W2K and XP set in three to five minutes, including Apache install ;-) I don't use .r extension though, I just name my scripts .cgi ... no special need to explicitly define other stuff in httpd.conf. # # "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "C:/ms-intranet/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> I sometimes found similar problem - debugging my scripts under windows, then moving them to linux ... it was caused by some ugly hidden line terminators ... new CGI article at RT's website suggest read and save cgi script on particular platform, that may help .... -pekr-

 [16/47] from: dominique:microplus at: 19-Mar-2003 10:51


hi everybody, because I had the same problems on Apache and Windows NT, I made a few tests : Following lines are citations from the Rebol-core User Guide page 11-3 and 11-4 : " The standard character for separating directories is the forward slash (/), not the backslash(\) File paths that do not begin with a forward slash (/) are relative paths. To refer to the C volume that is often used by Windows, the notation is : %/C/docs/file.txt Notice in the above line that the disk volume C is not written as : %c:/docs/file.txt The above example is not a machine independent format and causes an error " Refering to this information (and not having other Information in the Chapter CGI of this guide), I thought I had to respect the same conventions for the shebang-line as for files. I first tried #!/C/Programme/Rebol/core/rebol -cs and had the same problem than Dave Fobare (".... all attempts ... ended up with the source of the file being pushed to the browser as if it were a .txt file.") I tried a lots of different solutions without success For a few minutes, trying the solution proposed by Louis (see email below), I had it ============= GREATE THANKS TO LOUIS ========================= ====== I tried following lines : #!C:/Programme/Rebol/core/rebol.exe -cs works fine (no space between #! and C) #! C:/Programme/Rebol/core/rebol.exe -cs works fine (a few spaces between #! and C) #!C:\Programme\Rebol\core\rebol.exe -cs works fine (I believe Rebol convert \ in / ) #!C:\Programme\Rebol\core\rebol -cs works fine (without .exe) And now it worked properly, following lines PRODUCE AN ERROR (and don't push the file to the browser as if it were a .txt file ANY MORE) #!/C:/Programme/Rebol/core/rebol.exe -cs #!/C:/Programme/Rebol/core/rebol -cs #!/C/Programme/Rebol/core/rebol.exe -cs #!/C/Programme/Rebol/core/rebol -cs -- dom

 [17/47] from: petr:krenzelok:trz:cz at: 19-Mar-2003 11:33


Ohlsson, Dominique wrote:
>And now it worked properly, following lines PRODUCE AN ERROR (and don't push >the file to the browser as if it were a .txt file ANY MORE) > >#!/C:/Programme/Rebol/core/rebol.exe -cs >#!/C:/Programme/Rebol/core/rebol -cs >#!/C/Programme/Rebol/core/rebol.exe -cs >#!/C/Programme/Rebol/core/rebol -cs >
all seem to work for me .... -pekr-

 [18/47] from: dominique:microplus at: 19-Mar-2003 13:00


Hi Petr, you'r right - the installation of Apache and Rebol isn't a problem and takes a few minutes. But the tests after the installation are the problem. I don't speak about errors in the script (wrong path and wrong syntaxe) because it is normal in this case that it doesn't work. I'm rather speaking about the fact, that the FIRST CGI-script doesn't always function even if there is no error in it and everythings is installed and declared properly. It seem's, I'm not the only one having the problem otherwise there wouldn't be so many upset programmers trying to find a solution (in the last few days I had a look at a few newsgroups and was amazed about the number of people having exactly the same problems as I did). Anyway I don't have the problem anymore - it finally worked (I already sent some information about what I did to get it work, hoping it will help others). In order to get the FIRST CGI script working, I believe it can help to follow some rules about the shebang-line like : - disable security with -s - put rebol.exe rather than rebol - I didn't notice if the extension for the script is important (but I tried .cgi as you said) the shebang-line could be like that: #!C:/rebol/rebol.exe -cs But after the FIRST CGI-script worked well, there are no problem anymore and it works even if the declaration of the shebang-line differs from that I wrote above : - the security is ok - it doesn't matter if you put rebol or rebol.exe - the extention for the script doesn't matter (I just tried script.aaa.txt as name !!!!) the shebang-line could be like that: #!C:/rebol/rebol -c Petr I just received you answer : Ohlsson, Dominique wrote:
>And now it worked properly, following lines PRODUCE AN ERROR (and
don't push
>the file to the browser as if it were a .txt file ANY MORE) > >#!/C:/Programme/Rebol/core/rebol.exe -cs >#!/C:/Programme/Rebol/core/rebol -cs >#!/C/Programme/Rebol/core/rebol.exe -cs >#!/C/Programme/Rebol/core/rebol -cs > > >
all seem to work for me .... -pekr- I'm glad to know, that it works for you - I tried it again with #!/C/Programme/Rebol/core/rebol.exe -c and #!/C:/Programme/Rebol/core/rebol.exe -c and get following error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. More information about this error may be available in the server error log. Apache/1.3.26 Server at pcxxxxxxxxxx ERROR.LOG (I tried with 2 different extentions) [Wed Mar 19 12:42:30 2003] [error] [client 127.0.0.1] couldn't spawn child process: c:/programme/apache/cgi-bin/now.r [Wed Mar 19 12:49:36 2003] [error] [client 127.0.0.1] couldn't spawn child process: c:/programme/apache/cgi-bin/now.cgi When I put again #!C:/Programme/Rebol/core/rebol -c it works again very fine I DON'T UNDERSTAND WHY ??????????????????????????????????

 [19/47] from: tim:johnsons-web at: 19-Mar-2003 7:56


* Dave Fobare <[editor--the-sports-page--com]> [030318 12:31]:
> Tim, > > My problem is a need to stay with a reasonably priced NT/Win2K host that > supports CF. If I were to move to a 'Nix based host, cost would not be a > problem at all as 'Nix-based hosts are generally a good deal cheaper than > Win2K for the same level of space/traffic/support.
Understood. This provider offers NT 4.0 servers. (don't know about Win2K) One of my clients is now on a NT 4.0 server and the cost is all the same....
> I've never had a problem getting Rebol CGI to work on my development > boxes(Win98+Apache, or Win2K/IIS/Apache).
<<quoted lines omitted: 12>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

 [20/47] from: antonr:iinet:au at: 20-Mar-2003 12:04


The shebang line is not interpreted by rebol, so the path should be in a format understood by the server. Rebol has nice platform-independant paths, but the server may not. Rebol only starts interpreting at the rebol header: rebol [ ... ] As far as I know, only rebol uses the path notation where the root directory is specified by a leading slash. If you try that on windows, you will get an error. It doesn't help that apache gives you a very generic error message on such a common error, but there you are. By the way, apache probably translates forward slashes to backslashes for you, doing some of the work supporting the underlying OS path notation. This might seem rebolish to you, but it is not rebol doing this. Anton.

 [21/47] from: dominique::microplus::de at: 20-Mar-2003 8:57

AW: Re: AW: Re:Trying to get Rebol CGI working on my webs ite


Hi Anton, Thanks for your explanations. They make sense. But Petr Krenzelok used yesterday Apache on Win2k, made few tests and wrote, he doesn't have any problems with shebang like: #!/C:/Programme/rebol/rebol.exe -c or #!/C/Programme/rebol/rebol.exe -c ok I'm working with Apache on WinNT. It's possible there are small differences. -- dom

 [22/47] from: al:bri:xtra at: 20-Mar-2003 20:56

Re: AW: Trying to get Rebol CGI working on my website


For the Xitami webserver on Windows XP Home, I use: #! C:\Rebol\Base\rebol.exe -cs Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [23/47] from: antonr:iinet:au at: 20-Mar-2003 20:26


That is what I don't understand. Maybe that version of apache ignores a leading slash. Anton.

 [24/47] from: petr:krenzelok:trz:cz at: 20-Mar-2003 11:09


Anton wrote:
>That is what I don't understand. >Maybe that version of apache >ignores a leading slash. > >Anton. >
Damn, my bad, I should look better. It does not work indeed. Sorry folks. I just looked at "having space here or there, .exe not .exe" issues and haven't noticed leading slash - it does not work of course. Sorry for wasting your time ... -pekr-

 [25/47] from: editor:the-sports-page at: 21-Mar-2003 20:39


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. 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. Dave Fobare

 [26/47] from: nitsch-lists:netcologne at: 22-Mar-2003 8:23


Dave Fobare wrote:
> I'm back! > I just got a message from a tech at ReadyHosting.com, my Win2K host.
<<quoted lines omitted: 17>>
> before I write back to him. > Dave Fobare
Eventually try as "now.r" instead of "now.cgi"? it may choose interpreter by file extension, so *.pl, *.cgi -> perl, *.r -> rebol. -Volker

 [27/47] from: gscottjones:mchsi at: 22-Mar-2003 6:00


Hi, Dave, From: "Dave Fobare" ...
> 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."
Congrats! Your hosters must be more open minded than most!
> 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?)
...
> 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 don't know if this is a Perl error message. My guess is that the .cgi and .pl are still mapped to run perl scripts either because of the IIS configuration and/or the registry. Perhaps the "shebang" line is ignored for any script (or at least those scripts ending with these two extensions). The very next thing I would try is to rename the script with a .r extension, and see if this extension is mapped to REBOL, both with and without a shebang line in the script. If this experiment shows that a shebang line is needed for any script not ending in .pl and .cgi, but is still not running the script through REBOL, I would double check whether you are to use the shebang line to point to your *own* REBOL exe, or to the hoster's installed copy (presumably in a different directory). Good luck! --Scott Jones

 [28/47] from: editor:the-sports-page at: 22-Mar-2003 7:24


Tried that -- the text of the script itself is pushed to the browser. I tried renaming it to now.pl, and received the very same error message, so I'm assuming its still being treated as a Perl script. Dave Fobare

 [29/47] 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.
<<quoted lines omitted: 11>>
> 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-

 [30/47] from: joel:neely:fedex at: 22-Mar-2003 7:52


Hi, Dave, That is a Perl error message. Do you know where rebol.exe was installed? (Your directory or some common place (e.g. "Program Files") ? Here are some things to verify the state of affairs: 1) Try loading this file to your web area as hello1.cgi and see if you get the expected results when accessing your site: 8<--------------------------------------------------------------------- #!/usr/local/bin/perl -w print <<EOS; Content-type: text/html <html> <head><title>Hello</title></head> <body><p>Hello, world!</p></body> </html> EOS exit (0); 8<--------------------------------------------------------------------- If that gives you the Canonical First Page when you hit it with your browser, then try next: 2) First, load this file as hello.r to your web site: 8<--------------------------------------------------------------------- REBOL [] print {Content-type: text/html <html> <head><title>Hello</title></head> <body><p>Hello, world!</p></body> </html> } 8<--------------------------------------------------------------------- Then load this file as hello.cgi to your web site: 8<--------------------------------------------------------------------- #!/usr/local/bin/perl -w open (IPC, 'rebol -c hello.r |') or die "Can't pipe from child!"; while (defined (my $line = <IPC>)) { print $line; } close (IPC); exit (0); 8<--------------------------------------------------------------------- In the line beginning "open (IPC, ..." replace the word "rebol" with the full path to where REBOL is installed on the server (unless you know for sure that it will be within the PATH of the web server. If I understand your previous notes correctly, trying to access hello.r will just get you back the source of that file above. Try to access hello.cgi and see what you get. That file (as written above) is just a wrapper that will run the named REBOL script and send its output back to the browser. Please try these experiments and let us know what you get. -jn- Dave Fobare wrote:
> Tried that -- the text of the script itself is pushed to the browser. I > tried renaming it to now.pl, and received the very same error message, so
<<quoted lines omitted: 6>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Polonius: ... What do you read, my lord? Hamlet: Words, words, words. _Hamlet_, Act II, Scene 2

 [31/47] from: editor:the-sports-page at: 22-Mar-2003 12:13


Joel, Thanks for the suggestions. Here is how things went:
>Do you know where rebol.exe was installed? (Your directory or >some common place (e.g. "Program Files") ?
Don't know.
>Here are some things to verify the state of affairs: >1) Try loading this file to your web area as hello1.cgi and see
<<quoted lines omitted: 7>>
>exit (0); >8<---------------------------------------------------------------------
Tried this, and the text itself was pushed to the browser: Content-type: text/html Hello, world! Note that the "shebang" line again must have been ignored -- #!/usr/local/bin/perl -w makes no sense on a Win2K machine.
> If that gives you the Canonical First Page when you hit it with your > browser, then try next:
<<quoted lines omitted: 5>>
>} >8<---------------------------------------------------------------------
Previously, files with the .r extension had their contents directly pushed to the browser. Now things have changed -- trying to execute hello.r causes a Windows IE box to pop up asking me if I'd like to download the file or execute it. If I choose the latter, Rebol/View on my local machine is opened. Now for something interesting:
> Then load this file as hello.cgi to your web site: >8<---------------------------------------------------------------------
<<quoted lines omitted: 9>>
> the full path to where REBOL is installed on the server (unless you > know for sure that it will be within the PATH of the web server.
I relied on the PATH variable because I wasn't told where it was installed.
> If I understand your previous notes correctly, trying to access > hello.r will just get you back the source of that file above.
It appears that the hello.r script indeed executed properly, meaning the IPC(lemme guess -- InterProcessCommunication, right?) call worked. Of course, the "content-type" string came out again. Any suggestion on what I should tell the support tech? Dave Fobare

 [32/47] from: joel:neely:fedex at: 22-Mar-2003 12:13


Hi, Dave, Hmmmmm... Windows goofiness abounds! ;-) Dave Fobare wrote:
> ... Here is how things went: > >
<<quoted lines omitted: 13>>
> Note that the "shebang" line again must have been ignored -- > "#!/usr/local/bin/perl -w" makes no sense on a Win2K machine.
Almost. I left that in there because Perl itself uses the options in that line, and I *always* run cgis with -w turned on. Anyway, let's do a couple of small changes: 1) What you're showing above is not what was in the first Perl script; that script had the html tags in it, so let's rule that out as as open issue: 8<--------------------------------------------------------------------- #!/usr/local/bin/perl -w print <<EOS; Content-type: text/html <html> <head><title>Hello</title></head> <body><p>Hello, world!</p></body> </html> EOS exit (0); 8<--------------------------------------------------------------------- 2) Put the above in your web site, and hit it with your browser. Be sure that if you're using ftp, you upload it as ascii. 3) Hit it with your browser. If you see the correct page, then make the same changes (i.e. put the html tags back in) to the REBOL version and try that. 4) If the Perl above comes back with the raw html tags exposed, then take a look at the source file ("View source" or the equiv in your browser of choice) that you're getting back, to make sure that the cgi handler at your ISP isn't wrapping everything with html and a set of <pre> tags, or some such nonsense. 5) If you're getting plain text back from the script above, then I'd first communicate that fact to your ISP's tech support and ask if they can tell you why you're getting back text/plain instead of the expected text/html. 6) If the above test (step (1)) actually works, but your REBOL version is still coming back as plain text, then let me know, and we can change the wrapper in an attempt to narrow in on the source of the oddity. -jn- -- Polonius: ... What do you read, my lord? Hamlet: Words, words, words. _Hamlet_, Act II, Scene 2

 [33/47] from: editor:the-sports-page at: 22-Mar-2003 14:16


Joel,
>Hmmmmm... Windows goofiness abounds! ;-)
Truly!
>Anyway, let's do a couple of small changes: > >1) What you're showing above is not what was in the first Perl script; > that script had the html tags in it, so let's rule that out as as > open issue:
From your original email --> 8<--------------------------------------------------------------------- #!/usr/local/bin/perl -w print <<EOS; Content-type: text/html Hello, world! EOS exit (0); 8<--------------------------------------------------------------------- I don't see any html tags in there. Dave Fobare

 [34/47] from: ingo:h-o-h at: 22-Mar-2003 21:25


Hi Dave, <disclaimer> This mail will arrive twice, I first sent from my no more subscribed email address, so this original mail will first have to be manually confirmed, that's why I'm sending it again </disclaimer> Dave Fobare wrote: <...>
> I relied on the PATH variable because I wasn't told where it was installed. >> If I understand your previous notes correctly, trying to access
<<quoted lines omitted: 3>>
> course, the "content-type" string came out again. > Any suggestion on what I should tell the support tech?
I guess two things should be done: - append .r extension to addhandler directive maybe you could even do it yourself with an .htaccess file in your document-root containing the line: AddHandler cgi-script .cgi .sh .pl .r - Tell apache to use the rebol executable for .r files, but how this is done on winows, if #! lines seem to ignored, is way beyond me. (Maybe it'd work, if they told you _where_ they installed rebol, and you used the correct path? I don't know ...) I hope that helps, kind regards, Ingo

 [35/47] from: lmecir:mbox:vol:cz at: 22-Mar-2003 21:56


Hi Dave,
> Previously, files with the .r extension had their contents directly pushed > to the browser. Now things have changed -- trying to execute hello.r
causes
> a Windows IE box to pop up asking me if I'd like to download the file or > execute it. If I choose the latter, Rebol/View on my local machine is
opened. This is an IE bug, you should download the file and check its contents, or use another browser. Regards -L

 [36/47] from: editor:the-sports-page at: 22-Mar-2003 17:36


Ingo, Thanks for the suggestion, but IIS does not utilize the .htaccess file. Dave Fobare

 [37/47] from: joel:neely:fedex at: 22-Mar-2003 19:03


Hi, Dave, What mail client are you using? I just went back and looked at my original (using Netscape 4.8) and the tags are there! I'm inserting a copy of that section of the original below:
> 8<--------------------------------------------------------------------- > #!/usr/local/bin/perl -w
<<quoted lines omitted: 7>>
> exit (0); > 8<---------------------------------------------------------------------
If you don't see the tags above, then I suspect your email client of tagicide! ;-) If you can't see them, then cut the bit below and paste it into a REBOL console to se what I sent originally. print to-string #{ 23212F7573722F6C6F63616C2F62696E2F7065726C202D770A0A7072696E7420 3C3C454F533B0A436F6E74656E742D747970653A20746578742F68746D6C0A0A 3C68746D6C3E0A3C686561643E3C7469746C653E48656C6C6F3C2F7469746C65 3E3C2F686561643E0A3C626F64793E3C703E48656C6C6F2C20776F726C64213C 2F703E3C2F626F64793E0A3C2F68746D6C3E0A454F530A0A6578697420283029 3B } -jn- -- Polonius: ... What do you read, my lord? Hamlet: Words, words, words. _Hamlet_, Act II, Scene 2

 [38/47] from: lmecir:mbox:vol:cz at: 23-Mar-2003 10:35


Hi Dave,
> This is an IE bug, you should download the file and check its contents, or > use another browser. > > Regards > -L
you are shooting at two targets here. IE has got a bug that offers you a download if you try something like: http://www.someplace.dom/rebolcgi.r after you have Rebol/View installed on your machine. Try to use IE on a machine not having Rebol/View installed, use another browser, or try to use something like: http://www.someplace.dom/rebolcgi.r/nonsense.txt instead as an URL. The "nonsense.txt" part doesn't have any influence other than to eliminate the "crazy" behaviour of IE. HTH -L

 [39/47] from: editor:the-sports-page at: 23-Mar-2003 8:44


L, That particular suggestion gets me a 404 Not Found error. Dave Fobare

 [40/47] from: gscottjones:mchsi at: 23-Mar-2003 8:24


Hi, Dave, From: "Dave Fobare" ...
> Any suggestion on what I should tell the support tech?
I suspect that what you are describing is a "mapping" issue with the IIS configuration. Out of curiosity, I googled microsoft's site for cgi configuration and was given the following link: www.microsoft.com/technet/prodtechnol/iis/deploy/projplan/appmig.asp Scroll down to: "Configuring a Script Interpreter" and consider excerpting the 4 steps for the convenience of tech support. Tell them which extension you want mapped to the rebol interpreter (such as .r). It looks pretty straight forward. Hopefully this will allow them to most easily correct the problem. Another search suggests that IIS itself ignores the shebang line. This may have been the red-herring causing some confusion in this whole thread. Again, a reminder, that I am not an IIS expert, much less an IIS novice, so the infomation may only be worth the electronic ink that it was written with. HTH --Scott Jones

 [41/47] from: lmecir:mbox:vol:cz at: 23-Mar-2003 16:27


> That particular suggestion gets me a 404 Not Found error. > > Dave Fobare
e.g. if you try: http://cosi.ksi.vslib.cz/tia-cgi/cgicheck.cgi/nonsense.txt , which is a rebol cgi program, you can have a look, what is a normal output of such a command. Regards -L

 [42/47] from: SunandaDH:aol at: 23-Mar-2003 10:31


Dave:
> Thanks for the suggestion, but IIS does not utilize the .htaccess file.
Take a look at: http://www.rebol.com/docs/core23/rebolcore-13.html It has some notes for configuring IIS. Sunanda.

 [43/47] from: lmecir:mbox:vol:cz at: 23-Mar-2003 16:20


> That particular suggestion gets me a 404 Not Found error. > > Dave Fobare >
In that case I think, that the Rebol interpreter hasn't been invoked at all on the server side. It is a configuration problem. To be absolutely sure, you can try to use another browser, or another machine, where the Rebol/View hasn't been installed. Regards -L

 [44/47] from: editor:the-sports-page at: 23-Mar-2003 11:16


Scott, Thanks for the help. What really bugs me *now* is that I've been able to get Rebol CGI working on a *different* Windows-based webhost. I was thinking about this for awhile, and remembered that I have placed an exceedingly low-priority website of my employer's with a host called CrystalTech. They are reasonably priced(though not as low as ReadyHosting), and have an excellent reputation for support. I ftp'ed up the rebol.exe and the example file now.cgi up to the site's cgi-bin directory. It worked right off! No configuration necessary. Know why? Well, it appears that on this CrystalTech installation, the shebang line is actually being read and understood! How do I know? Well, I changed the original text of the now.cgi shebang line(#!cgi-bin/rebol.exe -c) to reference a copy of Rebol in a non-existent directory(#!cgi-bin/rebol/rebol.exe -c). Sure enough, I received an error message(Can't exec cgi-bin/rebol/rebol at C:\INETPUB\harpco-pa\cgi-bin\now.cgi line 1.) that clearly indicates that the shebang line is being processed as it would on a *nix/Apache system. Now I'm *really* flummoxed. Dave Fobare

 [45/47] from: gscottjones:mchsi at: 23-Mar-2003 11:00


From: "Dave Fobare" ...
> Well, it appears that on this CrystalTech installation, the > shebang line is actually being read and understood!
...
> Now I'm *really* flummoxed.
That is interesting, and I agree with your analysis about the second site. Needless to say, I don't know why either. I'll stand mute from now on inorder to avoid further confusing the issue. Good luck! --Scott Jones

 [46/47] from: g:santilli:tiscalinet:it at: 23-Mar-2003 18:51


Hi Dave, On Sunday, March 23, 2003, 6:16:40 PM, you wrote: DF> Know why? Well, it appears that on this CrystalTech installation, the DF> shebang line is actually being read and understood! Maybe they are running Apache instead of IIS? Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [47/47] from: editor:the-sports-page at: 23-Mar-2003 14:11


No, CrystalTech is an exclusively Win2K & .NET host. DF

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted