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

Rebol with Xitami?

 [1/13] from: mat:eurogamer at: 16-Nov-2000 2:57


Hello, Anyone been able to get Rebol scripts to work as CGI's with the Xitami web server? I understand you have to put a line in the front of the script, so I put this; #! C:\Rebol\rebol.exe --cgi --script I used Tom's great looking test script, slapped it in cgi-bin - changed the HTML to simply refer to /cgi-bin/ etc. Nothing happens. :( -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [2/13] from: andyyork:gte at: 16-Nov-2000 1:35


Try #!/rebol/rebol.exe -cs assuming your webroot is also on C:\

 [3/13] from: sharriff:aina:med-iq at: 16-Nov-2000 7:34


Hi Larry! Running the Xitami sever with REBOL is not that straight forward as to getting your script headers right, you have to create a filter for REBOL., you can use my configuartion (been using XITAMI and REBOL for 2-3 weeks now): HEADER ----------------------- #!c:\rebol\rebol.exe -cs REBOL[] Print "Content-Type: text/html ^/^/" in your "c:\Xitami\xitami.cfg" file, add the following line to the FILTERS SECTION: .r=C:\rebol\rebol.exe -cs after this restart XITAMI , and your scripts would work ( or your REBOL path) hope this helps Sharriff Aina med.iq information & quality in healthcare AG Mat Bettinson <[mat--eurogame] An: Larry Palmiter <[rebol-list--rebol--com]> r.net> Kopie: Gesendet von: Thema: [REBOL] Rebol with Xitami? rebol-bounce@ rebol.com 16.11.00 02:57 Bitte antworten an rebol-list Hello, Anyone been able to get Rebol scripts to work as CGI's with the Xitami web server? I understand you have to put a line in the front of the script, so I put this; #! C:\Rebol\rebol.exe --cgi --script I used Tom's great looking test script, slapped it in cgi-bin - changed the HTML to simply refer to /cgi-bin/ etc. Nothing happens. :( -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [4/13] from: mat::eurogamer::net at: 16-Nov-2000 12:24


Heya Sharriff, SAmid> Hi Larry! It was me! SAmid> #!c:\rebol\rebol.exe -cs SAmid> REBOL[] SAmid> Print "Content-Type: text/html ^/^/" I got a test script to execute just fine. Which is better than I had before! Bizarre the filters don't actually work from the web config. I had lifted --cgi and --script from the rebol guide too... Anyhow, could you try Tom's script and his HTML example? I'd like to get that working as a framework for developing my scripts. It just hangs now. With the same header. I assume regular stdin/stdout is used to pass the CGI data to Rebol? -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [5/13] from: sharriff:aina:med-iq at: 16-Nov-2000 12:34


Hi Matt! IŽll try it as soon as possible
>>Bizarre the filters don't actually work from the web config.
which web config? cheers Sharriff Aina med.iq information & quality in healthcare AG

 [6/13] from: chris:starforge:demon at: 16-Nov-2000 12:44


Mat Bettinson wrote:
> > hangs now. With the same header. I assume regular stdin/stdout is used > to pass the CGI data to Rebol?
No, you need to decode system/options/cgi/query-string or read system/ports/input depending upon the submission method. http://www.rebol.com/howto.html has a fairly good section on the basics of cgi scripts. If you want I could send you a copy of the webring scripts off my website, they include things like reading from data files, handling form submissions, sending emails from cgi scripts and creating html pages on the fly. Have a look at http://www.starforge.co.uk/pamiga/ and the imagemap at the top of http://www.starforge.co.uk/links.html to see the sort of thing the scripts can do. Chris -- New sig in the works Explorer2260 Designer and Coder http://www.starforge.co.uk

 [7/13] from: mat:eurogamer at: 16-Nov-2000 14:24


Heya Sharriff,
>>>Bizarre the filters don't actually work from the web config.
SAmid> which web config? Err, the very nice web configuration system built-into Xitami. http://<yourhost>/admin -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [8/13] from: mat:eurogamer at: 16-Nov-2000 14:26


Heya Chris,
>> hangs now. With the same header. I assume regular stdin/stdout is used >> to pass the CGI data to Rebol?
C> No, you need to decode system/options/cgi/query-string or read C> system/ports/input Roger that. I got it working eventually. There's so many inconsistent command line switches being quoted in various documents though. --cs or -csi etc etc. The 's' bit I need to write files, so I've got it all working now. Is there any easy way to see script errors if your script blows out when being used as a CGI? Currently you just see nothing which made today's debugging most laborious. -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [9/13] from: chris:starforge:demon at: 16-Nov-2000 14:55


Mat Bettinson wrote:
> Is there any easy way to see script errors if your script blows out > when being used as a CGI? Currently you just see nothing which made > today's debugging most laborious.
If you put a print {Content-Type: text/html^/^/} on the line following the Rebol header (before you do anything else) it should display any errors in your web browser. If you are having problems getting that to work, try adding <HTML><BODY> after the ^/^/, that may help on some brwosers. You'll probably need to check the page source if your browser is fairly strict about page displaying. Chris -- New sig in the works Explorer2260 Designer and Coder http://www.starforge.co.uk

 [10/13] from: sharriff:aina:med-iq at: 16-Nov-2000 14:59


Oh that, it only works for a few things, I always edit the .CFG files per hand, its quicker :-) Sharriff Aina med.iq information & quality in healthcare AG Gutenbergstr. 42 41564 Kaarst tel.: 02131-3669-0 fax: 02131-3669-599 www.med-iq.de Mat Bettinson <[mat--eurogame] An: "[Sharriff--Aina--med-iq--de]" <[rebol-list--rebol--com]> r.net> Kopie: Gesendet von: Thema: [REBOL] Re: Antwort: Re: Antwort: Rebol with Xitami? rebol-bounce@ rebol.com 16.11.00 14:24 Bitte antworten an rebol-list Heya Sharriff,
>>>Bizarre the filters don't actually work from the web config.
SAmid> which web config? Err, the very nice web configuration system built-into Xitami. http://<yourhost>/admin -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [11/13] from: mat:eurogamer at: 16-Nov-2000 15:36


Heya Sharriff, SAmid> Oh that, it only works for a few things, I always edit the .CFG files per SAmid> hand, its quicker :-) A linux fan per chance? :) -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [12/13] from: t_degrav:rhrk:uni-kl at: 16-Nov-2000 17:00


Hi Mat! Chris wrote:
> Mat Bettinson wrote: > > Is there any easy way to see script errors if your script blows out
<<quoted lines omitted: 7>>
> is fairly strict about page displaying. > Chris
Chris is right, this usually works quite well, you just get the Rebol error message in your browser. But as you seemed to have configuration problems with your server calling the script you didn't even get this far. Maybe I could have mentioned that many server/OS combinations require something like "#!/rebol/rebol -cs" as the first line in the script, but as this differs a lot (I for example with IIS/NT don't need this at all) I didn't. I just wanted to provide the script and not comment on CGI configuration... Hope you can use it now! Tom

 [13/13] from: sharriff:aina:med-iq at: 16-Nov-2000 16:55


YEPP, peguins forever! Sharriff Aina med.iq information & quality in healthcare AG Mat Bettinson <[mat--eurogame] An: "[Sharriff--Aina--med-iq--de]" <[rebol-list--rebol--com]> r.net> Kopie: Gesendet von: Thema: [REBOL] Re: Antwort: Re: Antwort: Re: Antwort: Rebol with Xitami? rebol-bounce@ rebol.com 16.11.00 15:36 Bitte antworten an rebol-list Heya Sharriff, SAmid> Oh that, it only works for a few things, I always edit the .CFG files per SAmid> hand, its quicker :-) A linux fan per chance? :) -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

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