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

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

From: joel:neely:fedex at: 22-Mar-2003 12:13

Hi, Dave, Hmmmmm... Windows goofiness abounds! ;-) Dave Fobare wrote:
> ... Here is how things went: > > > > >8<------------------------------------------------------------------ > >#!/usr/local/bin/perl -w > > > >print <<EOS; > >Content-type: text/html > > > >Hello, world! > >EOS > > > >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. >
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