View previous topic :: View next topic |
Author |
Message |
gbogus -
Joined: 02 Jul 2003 Posts: 2
|
Posted: Tue Jul 22, 2003 8:37 pm Post subject: Configuring Abyss With REBOL as a CGI Interpreter |
|
|
Configuring Abyss With REBOL as a CGI Interpreter
What is REBOL?
The REBOL website (www.rebol.com) describes REBOL as a dialected programming language with a tiny footprint (~280 KB). It runs on dozens of different OS/hardware combinations. No installation is required and it has 100's of built-in functions and datatypes as well as built-in support for FTP, HTTP, SMTP, and other Internet protocols. REBOL/Core is free for personal, commercial and educational uses.
You will need:
1) Abyss version 1.1.6 or higher
2) REBOL/Core (configuration was tested with Windows build 2.5.5.3.1). This can be found here: http://www.rebol.com/download.html
Note: REBOL/Core is free for any use, although the commercial version (REBOL/Command) offers Fast CGI, database access, SSL and other functionality for US$349. If you'd like to use the free REBOL/Core version with MySQL, there is a scheme here: http://rebol.softinnov.org/mysql/
Installation:
1) Install Abyss according to the instructions on this site.
2) Download and unzip REBOL. There is no actual setup necessary. Just place the contents of the zip into a folder of your choice. In fact, you do not need anything more than the "rebol.exe" file. However, the other files do contain some documentation and some brief network setup options you can enter by launching rebol.exe and typing "do %setup.r" in the REBOL console.
Abyss Configuration:
1) Open the Abyss console and navigate to Server Configuration.
2) Click on the Advanced button.
3) Open the CGI Parameters page.
4) Set "CGI Processing Enabled" to Yes
5) Set the "Resolve interpreter using the script's #! line" option to Yes.
6) Add a CGI Path in the "CGI Paths" list. This should be either the name of your cgi-bin folder -- likely /cgi-bin (with a leading forward slash) or just simply / (just the forward slash indicates the root and all sub-folders).
Creating a Sample REBOL CGI Script:
1) Open a text editor and, as the first line, add the path to your REBOL executable preceded by "#!" (no quotes). The following are examples for Windows:
Scenario 1 - REBOL is installed in a sub-folder called "Rebol" underneath the default install folder of Abyss Web Server. The first line would be:
#!"c:\program files\abyss web server\rebol\rebol.exe" -c
Scenario 2 - REBOL is installed somewhere and the path to it is placed in the Windows PATH environment variable. The first line would be:
#!rebol -c
Linux/Unix config info can be found here:
http://www.rebol.com/docs/cgi1.html
Note that the REBOL executable is called using a "-c" parameter to place it in CGI mode.
2) Add the following lines to your text file starting on the line following the first #! line:
REBOL [Title: "Server Time"]
print ["Content-Type: text/html" newline newline]
print [<HTML><BODY>]
print ["Date/time is:" now]
print [</BODY></HTML>]
3) Save the text file into your cgi-bin folder as "timescript.r" and then try accessing it via the Abyss Web Server (likely to be http://127.0.0.1/cgi-bin/timescript.r). This should return the current date and time in a web page. If not, double check the pathnames you have entered in various places.
For more information on using REBOL as a CGI interpreter including step by step Linux/Unix info plus several sample scripts, check out these pages at the REBOL website:
http://www.rebol.com/docs/cgi1.html
http://www.rebol.com/docs/cgi2.html
[end] |
|
Back to top |
|
|
tdkyo -
Joined: 23 Dec 2002 Posts: 55
|
Posted: Thu Jul 24, 2003 2:21 am Post subject: |
|
|
So is this like another server-side language? This is cool! |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
|
Back to top |
|
|
graphics1design -
Joined: 27 Jun 2006 Posts: 1 Location: Design Studio
|
Posted: Thu Jul 06, 2006 10:52 pm Post subject: Just checking if any newer info needed. |
|
|
I am going to try to install rebol, is there any problems with versions and the most current related software/hardware. Where can I look at current version and compatability info? This info is very helpful, but dated and I want to see if there's any more new info before getting started. thanks. _________________ graphic design school, training services, design help |
|
Back to top |
|
|
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Fri Jul 07, 2006 2:22 am Post subject: |
|
|
i tried installing this but couldnt get it to work. well, i didnt try too hard to get it working but from what i tried through abyss' preferences couldnt get it to work. I probably just dont know what the hell i'm doing lol _________________ mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.
|
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Jul 07, 2006 4:42 am Post subject: |
|
|
Rebol still works with Abyss Web Server. I just successfully installed it on 2.3.2
without any problems. Use the sample script.
Code: | REBOL [Title: "Server Time"]
print ["Content-Type: text/html" newline newline]
print [<HTML><BODY>]
print ["Date/time is:" now]
print [</BODY></HTML>]
|
Sincerely, TRUSTAbyss |
|
Back to top |
|
|
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Fri Jul 07, 2006 5:09 am Post subject: |
|
|
Could you possibly throw together a real quick tutorial? I have everything set up the way it should be, I just think I'm missing one minor detail. _________________ mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.
|
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Jul 07, 2006 5:59 am Post subject: |
|
|
Sure,
Download Rebol/Core package from www.rebol.com and unzip the contents to
a new folder called Rebol, which will be located in the C:\ drive.
Open your Abyss Web Server console and click Configure for the Host you wish
to configure Rebol for. Go to Scripting Parameters, click Add in the Interpreters
table and copy the following settings.
Interface: CGI/ISAPI
Interpreter: C:\Rebol\rebol.exe
Arguments: -c
Type: Standard
Associated Extensions: r
Note: Make sure the checkboxes on the other options are checked. You can
also add -s to the Arguments to disable Security stuff.
Now click Ok to apply your settings. Add an Index File for "index.r" now. You
should have a successful installation of the Rebol/Core language.
Rebol test script: test.r (Put in htdocs of your server)
Code: | REBOL [Title: "Server Time"]
print ["Content-Type: text/html" newline newline]
print [<HTML><BODY>]
print ["Date/time is:" now]
print [</BODY></HTML>]
|
Usage: http://www.your-site.com/test.r
Sincerely, TRUSTAbyss |
|
Back to top |
|
|
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Fri Jul 07, 2006 6:34 am Post subject: |
|
|
Yea, I was missing the -c in the arguments, and then meant everything to my server apparently. Thnx TRUSTAbyss _________________ mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.
|
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Jul 07, 2006 6:36 am Post subject: |
|
|
No problem. I'm glad it works now. :-) |
|
Back to top |
|
|
|