View previous topic :: View next topic |
Author |
Message |
booksiberia -
Joined: 19 Apr 2003 Posts: 7
|
Posted: Sun Dec 11, 2005 11:59 pm Post subject: REBOL SERVER PAGES (RSP) - Anyone played with this? |
|
|
I downloaded an intriguing CGI framework (written in REBOL) that is described as follows on this site:
http://laurentchevalier.dyndns.org/rebol/rsp/
The Overview page states as follows:
RSP (REBOL Server Pages) is a CGI framework for building dynamic Web sites in REBOL.
Its main features are:
Recursive parsing and evaluation of RSP templates (REBOL code embedded in HTML page)
GET, POST and HEAD methods
Cookies
Session management
File upload caching (low-memory footprint)
File download function
Enhanced security (file size, cache size, memory usage limitations, disk and net access rights, etc.)
Logging
I have been trying to wrap my mind around adapting this for use
so that it will be up-and-running with the Abyss Web Server.
As the documentation goes on to say, " Basically, RSP is made of a CGI script, rsp.cgi, and a configuration file, rsp.conf. But it must be installed onto a Web server together with REBOL/Core and eventually REBOL/View. "
Which indicates to me that invoking it through Abyss instead of Apache is just a matter of configuring Abyss to invoke the rebol interpreter + the rsp.cgi script to process the html page(which may contain embedded REBOL script code within) and return the results to the requesting browser.
The way this is done under Apache is to use the AddHandler functionality to indicate that rsp.cgi (or rspv.cgi for REBOL/View) will handle pages with an .rsp or .rspv extension (and I suppose the .html extension also).
One question I have is: Does Abyss have some equivalent way of indicating that files of an indicated extension be invoked by a script (which in turn is invoked by an indicated interpreter [ i.e., REBOL/Core in this case ]?
The REBOL SERVER PAGES CGI framework comes in 3 possible download flavors (as far as I can see): 1) EasyRSP, which is an all-inclusive windows pre-configured Apache 2.x distribution with all RSP files and configuration pre-set, so that all you need to do is install it to a directory of your choice and run Apache.
2) An automatic Linux-based installation, also with Apache and the RSP scripts.
and 3) A quote, Manual install of RSP on any system and any Web server , UNQUOTE, which basically consist of various script files, documentaion, and configuration files.
However, no matter which one you download.
all documentation only refers to Apache (no mention of how to get this working with ANY other web server - not even IIS.)
Well, okay, not a biggie. By inspecting how things are set up under Apache, and looking over the configuration files, it might be possible to set things up by configuring Abyss and modifying paths, configuration files, etc. so that
everything is up and running -
It would be really nice to be able to have embedded REBOL scripting code inside a web page for several reasons:
1) Both the REBOL/ CORE and the REBOL/View executables are incredibally small, and thus load very quicky.
2) REBOL works with built-in networking capabilities,
3) REBOL is a messaging language with very good dialecting capabilities,
4) because of point #3, REBOL has a Parsing Dialect and a Visual Interface Dialect that is incredibly easy to use,
5) as a result, writing relatively sophisticated applications can typicaly be accomplished with very few lines of code,
6) REBOL code runs *EXACTLY* the same under all the platforms supported [ I believe around 30 platforms or so ]
7) As a cumulative result of points 1 - 6 above, enabling the scripting of REBOl code within your web page would potentially result in a high degree of flexibility, performance, and leverage, as compared to,say, javascript.
It might also be possible to enable the use of REBOL as a servlet technology, similar to the technology that is used within the Java Language for Applets [ but perhaps we could calll them REBLETS? ]
So, anyway, I was wondering if any of you might have been experimenting with using REBOL under Abyss Web Server, and if so, what you might think about this REBOL SERVER PAGES idea? |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Dec 12, 2005 1:21 am Post subject: |
|
|
These people hardly give you information on configuring RSP, I would really
think that they don't care about other Web Servers, and even on Apache the
configuration is pretty hard to follow. I will contact them about Abyss :-)
Edit: I tried installing this with Abyss Web Server but some of the
things like "bin", "conf", does not make any sense to me. Its very
easy to install Rebol CGI, but its almost impossible to do RSP. :/
The problem is trying to make Rebol/Core work with .rsp files. I don't
know how to do this. I will contact the company now and find out more
information in the future, im pretty sure everything will work out.
Edit: I sent the developers an e-mail and im hoping they can help us
with Rebol Server Pages. Hopefully, I will hear from them in a few hrs.
Sincerely, TRUSTpunk |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Dec 12, 2005 3:40 am Post subject: |
|
|
I installed RSP the proper way, but all I could get is an Error 500 , plus a
Broken Pipe error in the cgi.log file. I did everything that they said to do.
Here's what I did in order to try and get this application working.
Edit: Read Aprelium's reply, simple :-)
Sincerely, TRUSTpunk
Last edited by TRUSTAbyss on Mon Dec 12, 2005 4:07 pm; edited 5 times in total |
|
Back to top |
|
 |
booksiberia -
Joined: 19 Apr 2003 Posts: 7
|
Posted: Mon Dec 12, 2005 3:54 am Post subject: |
|
|
Hi TRUSTPunk!
Thanks for answering so quickly.
Regarding some of the observations you brought up/ mentioned:
TRUSTpunk wrote: | These people hardly give you information on configuring RSP, I would really
think that they don't care about other Web Servers, and even on Apache the
configuration is pretty hard to follow. I will contact them about Abyss :-) |
Hmm... THESE PEOPLE is only one guy, I believe. Mr Chevalier resides somewhere in Europe, last I remember - France, most likely. And if I recall correctly, REBOL SERVER PAGES was deleloped by shlik.org [ now defunct ], so it may be that RSP is no longer being actively maintained. However, that does not take away from the fact that RSP runs really well under the Apache Web server. My hope is that I can get it to perform under Abyss - I can't fathom any major difficulties, as all the code is available, and it's all in REBOL.
Quote: | Edit: I tried installing this with Abyss Web Server but some of the
things like "bin", "conf", does not make any sense to me. Its very
easy to install Rebol CGI, but its almost impossible to do RSP. :/
|
If you are confused about the .conf files, I may be able to clear up a little bit of the confusion. Basically some of the configuration files [primary example rsp.conf ] have nothing to do per se with Appache (or any other web server) - instead this configuration file is read by the rsp.cgi or rspv.cgi scripts so that some aspects of how to dynamicaly parse the .rsp file or files can be specified within the .conf file.
In other words:
REBOL is the interpreter that must be invoked,
the rsp.cgi file is the file containing a script that "knows" how to process an .html file which has REBOL script code embedded within it,
the configuration information within the rsp.conf file is loaded and used by the rsp.cgi script to "tell" the rsp.cgi file exactly the things it needs to know to accomplish the parsing of the html code and identify/ extract/ process the REBOL-specific script code.
As a result, some .html file (or perhaps a .rsp or a .rspv file) is then processed, with all REBOL script code replaced by their "result"
In this manner, the information returned is (possibly) html/txt [ but it could be img/png or some other type that a cgi server could return to the requesting browser ]
Of course, SOME of the files, eg httpd.conf explicitly are Apache-specific. Not knowing what all the differences between Apache and the Abyss web servers are, especially in regards as to how they accomplish various tasks, such as specifying a specific .cgi file to be invoked in order to handle files with embedded, tagged script code (and having a specific file extension),
I thought it best to inquire in Aprellium's forum.
As far as the bin, cgi-bin, log and other such directories that are mentioned within the documentation, these happen to be the Apache-specific directories that various parts are placed in under the Apache setup, and thus are likely to be different when running with the Abyss Web Server.
Accordingly, some of the code within the the rsp.cgi and the rspv.cgi files might have to be tweaked. But on first inspection, there apear to be 2 or 3 lines of code to adjust, as far as I could determine.
Hopefully this info might help orient anyone browsing through the files and admittedly sparse documentation. |
|
Back to top |
|
 |
booksiberia -
Joined: 19 Apr 2003 Posts: 7
|
Posted: Mon Dec 12, 2005 4:08 am Post subject: |
|
|
TRUSTpunk wrote: |
Note: I had to create an Alias for the cgi-bin folder where I installed
Abyss Web Server "C:\Program Files\Abyss Web Server", in order for
me to have a cgi-bin folder. Im sorry to bring the bad news.
Sincerely, TRUSTpunk |
TRUSTPunk.
Is it necessary to place the Rebol/core and Rebol/View in a cgi-bin directory? Or to even have a cgi-bin directory at all?
And why is creating an Alias for the cgi-bin folder "bad" news? Are there security issues or limitations relating to Aliasing? |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Mon Dec 12, 2005 8:15 am Post subject: |
|
|
booksiberia wrote: | Is it necessary to place the Rebol/core and Rebol/View in a cgi-bin directory? Or to even have a cgi-bin directory at all?
And why is creating an Alias for the cgi-bin folder "bad" news? Are there security issues or limitations relating to Aliasing? |
Abyss a few years back was provided with a cgi-bin aliase. However, the the main program code was modified to allow better running of server side scripts from the main htdocs directory, using patterns (eg: /*.php) in the Script Paths table.
So no there is no security issues, or limitations to doing this. However, people now using Abyss generally don't like the idea of putting any of their scripts into the cgi-bin, if there's no need to why bother? That's why Abyss doesn't have one as standard after an install.
and yes I know it's 7am, but I live in Halls, and we've just had a firedrill :( _________________ Olly |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Dec 12, 2005 11:18 am Post subject: Re: REBOL SERVER PAGES (RSP) - Anyone played with this? |
|
|
booksiberia wrote: | One question I have is: Does Abyss have some equivalent way of indicating that files of an indicated extension be invoked by a script (which in turn is invoked by an indicated interpreter [ i.e., REBOL/Core in this case ]? |
Yes. All you have to do is to add a new interpreter, set its Interpreter file path to:
Code: | C:\Program Files\Abyss Web Server\cgi-bin\rebol\core\rebol.exe |
Then in the arguments field, enter:
Code: | -cs C:\Path\to\rsp.cgi %1 |
(Note that %1 at the end of arguments is optional. If the arguments field does not contain %1, it will be appended to it internally.)
By doing so, any file which needs this interpreter will result in the following command line to be executed:
Code: | C:\Program Files\Abyss Web Server\cgi-bin\rebol\core\rebol.exe -cs C:\Path\to\rsp.cgi THEFILE.EXT |
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Dec 12, 2005 4:13 pm Post subject: |
|
|
I still get a Broken Pipe error in the cgi.log file, not only that but I noticed
that the path I added in the arguments had no \ in it. I created a quick fix
by adding the two slashes method that you use in website scripts.
Here's what the cgi.log outputed.
Quote: |
CGI: [C:\Rebol\core\rebol.exe -cs C:Rebolrsp.cgi script.rsp ] URI: /script.rsp Broken pipe
|
After adding the two slashes in the path, I get the following
Quote: |
CGI: [C:\Rebol\core\rebol.exe -cs C:\Rebol\rsp.cgi script.rsp ] URI: /script.rsp Broken pipe
|
I don't understand why it outputs an Error 500 each time. I followed
every step that aprelium said to do and put all the RSP setup files in
the C:\Rebol\core\ and C:\Rebol\view folder. Nothing!
Maybe it won't work after all ? |
|
Back to top |
|
 |
booksiberia -
Joined: 19 Apr 2003 Posts: 7
|
Posted: Mon Dec 12, 2005 4:27 pm Post subject: |
|
|
olly86 wrote: | booksiberia wrote: | Is it necessary to place the Rebol/core and Rebol/View in a cgi-bin directory? Or to even have a cgi-bin directory at all?
And why is creating an Alias for the cgi-bin folder "bad" news? Are there security issues or limitations relating to Aliasing? |
Abyss a few years back was provided with a cgi-bin aliase. However, the the main program code was modified to allow better running of server side scripts from the main htdocs directory, using patterns (eg: /*.php) in the Script Paths table.
So no there is no security issues, or limitations to doing this. However, people now using Abyss generally don't like the idea of putting any of their scripts into the cgi-bin, if there's no need to why bother? That's why Abyss doesn't have one as standard after an install.
|
Hello olly86!
So there would be no problem, say, with placing the .cgi files [ rsp.cgi and rspv.cgi ] in the htdocs subdirectory?
What about the rsp.conf file, which is loaded by either rsp.cgi or by rspv.cgi? Where would that file be put? In htdocs along with? or possibly elsewhere.
Should the REBOL executable files live in subdirectories UNDER the htdocs directory? Or does it matter which directory the interpreter lives in? |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Dec 13, 2005 1:45 pm Post subject: |
|
|
booksiberia wrote: | So there would be no problem, say, with placing the .cgi files [ rsp.cgi and rspv.cgi ] in the htdocs subdirectory?
What about the rsp.conf file, which is loaded by either rsp.cgi or by rspv.cgi? Where would that file be put? In htdocs along with? or possibly elsewhere.
Should the REBOL executable files live in subdirectories UNDER the htdocs directory? Or does it matter which directory the interpreter lives in? |
Abyss Web Server relies on file extensions to know which interpreter to use for a given script, and on the Script Paths to check if the file can be considered as a script and be executed. So there are no limitation other than what you set in your configuration.
When the script is executed, the web server has no control on what files it can access. The script is run by an interpreter and the interpreter will be subject to the OS file permission rules when it comes to file accesses (chmod in Unix, readonly flags in Win95/98/ME, and file security settings in Windows NT/2000/XP/2003).
The settings of the new interpreter as described by TRUSTpunk are right. But one has to get the error output from REBOL to understand why it stopped its execution without sending any output. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
booksiberia -
Joined: 19 Apr 2003 Posts: 7
|
Posted: Wed Dec 14, 2005 4:43 am Post subject: |
|
|
aprelium wrote: |
Abyss Web Server relies on file extensions to know which interpreter to use for a given script, and on the Script Paths to check if the file can be considered as a script and be executed. So there are no limitation other than what you set in your configuration. |
Since the rebol interpreter that is to be invoked has to launch the rsp.cgi script, then I presume that one of the file extensions that should be listed is .cgi ?
And since there are two versions of the interpreter, one for command line (REBOL/Core ) and the other for visual gui and image processing ( REBOL/View ), I am further presupposing that the .cgi extension should be listed for both interpreters?
What happens when more than one interpreter contends for the same file extension? (i.e, there are several possible interpreters which could possibly be invoked for a .cgi file, for example? )
Quote: |
When the script is executed, the web server has no control on what files it can access. The script is run by an interpreter and the interpreter will be subject to the OS file permission rules when it comes to file accesses (chmod in Unix, readonly flags in Win95/98/ME, and file security settings in Windows NT/2000/XP/2003). |
In windows XP, what are the default file security settings for directories and files?
Quote: |
The settings of the new interpreter as described by TRUSTpunk are right. But one has to get the error output from REBOL to understand why it stopped its execution without sending any output. |
So if I understand correctly, given the settings that TRUSTPunk used, the actual (and correct) rebol interpreter was successfully launched, and the lines of code within the rsp.cgi script were processed, possibly up to some point where a broken pipe occurred, which -
if that's what occurred - would mean that Abyss did what it was supposed to, but the actual problem originates within the rsp.cgi script itself,
i.e, the problem had nothing to do with the abyss web sever setup.
Fair enough.
But it seems odd, though, when one considers that the same rsp.cgi script works perfectly when launched under the Apache Web Server under the same operating system (windows XP in my case) without producing a broken pipe error, yet a broken pipe occurs when the same code is excuted while under the purview of Abyss.
Odd, because the *only* difference is the fact that the rsp.cgi script is being served on the one hand by Apache, and on the other by Abyss, which causes me to scratch my head a little, and ask "If the problem originates within the script itself, shouldn't it fail under both web servers?".
I guess it would help if I better understood under what conditions a "broken pipe" might occur. Sadly, a google search did not succeed in clearing this up at all. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Dec 14, 2005 12:43 pm Post subject: |
|
|
booksiberia,
We're going to give RSP a try and report our findings as soon as possible. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|