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

[REBOL] Re: [REBOL]Re:Trying to get Rebol CGI working on my website

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 > I'm assuming its still being treated as a Perl script. > > Dave Fobare > > >Eventually try as "now.r" instead of "now.cgi"? it may choose interpreter > >by file extension, so *.pl, *.cgi -> perl, *.r -> rebol. > > -- > To unsubscribe from this list, please send an email to > [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