Rebol cgi

Discussion in 'Rebol' started by MaxV, May 24, 2010.

  1. MaxV

    MaxV Member

    Hello world,
    I never used cgi before, but I'm very interested in using Rebol instead of php.
    I have a linux hosting for my site, so I tried to make the following script and put it in the same folder of rebol executable:
    #!./rebol -c
    REBOL [Title: "Server Time"]
    print "content-type: text/html^/"
    print [<HTML><BODY>]
    print ["Date/time is:" now]
    print [</BODY></HTML>]
    but I receive the 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.

    so I looked at the log:
    [Mon May 24 17:42:57 2010] [error] [client] File does not exist: /web/htdocs/www.myste.example/home/admin

    Have you any idea?:confused:
  2. notchent

    notchent Member

    Is ./rebol chmod to 755? Is your script chmod to 755? Do cgi scripts need to be in a particular folder on your server? Try -cs options, instead of just -c . HTH :)
  3. Sunanda

    Sunanda New Member

    All of what Graham said.

    Plus other things to check:
    • is that path to the executable right? it may need to be something like #!/account-name/rebol/...
    • have you got the right line terminations? apache can be picky about CR vs CRLF vs LF
  4. swhite

    swhite Member

    I thought you needed two blank lines after the "Content-type" line.

    You would not put your script in the same file as the rebol executable, unless the rebol executable was in the proper folder for cgi scripts. On opensuse 10.1 the location is /srv/www/cgi-bin.
  5. Graham

    Graham Developer Staff Member

    print "content-type: text/html^/"
    print gives one line
    ^/ gives the other

    The error sounds as though you're looking for the script in the wrong place.
  6. MaxV

    MaxV Member

    It seems that my provider doesn't allow other executables except Perl and PHP.... :(
  7. notchent

    notchent Member

    Bad provider :( I've been using lunarpages for years, and have had no problems. Someone posted yesterday at that hostgator also allows REBOL cgi.

Share This Page