World: r3wp
[CGI] web server issues
older newer | first last |
Tim 20-Feb-2005 [26] | I'm not using rebol to do the upload. WS_FTP *does* convert line endings, Total Commander's FTP client does not. It occurs to me that using the 'q option is a good idea for CGI in general. You think? |
Anton 20-Feb-2005 [27x3] | Umm... I can't remember... I think so. :) |
Did you see the How-To "Quick and Easy CGI" ? (Go to http://www.rebol.net/ then click "How-to") | |
What version of rebol are you using (on server and local) ? Could be one of those cgi quirks that were in older releases. | |
Tim 20-Feb-2005 [30] | I have been CGI programming in rebol for almost 5 years and never ran into this. That how-to seems older and less complete than another one that I came across that *did* mention the usage text showing up. But I did not book mark it..... As to versions. I seem to recall that the domain hoster was reluctant to upgrade after the last major release of 'core because of some broken code somewhere. He hosts dozens of rebol sites.... |
Graham 20-Feb-2005 [31] | usage text appearing in my experiences is always because the file has not been detabbed |
Anton 20-Feb-2005 [32x2] | Why can't the domain hoster just run multiple rebols ? Just save each one with the version number... |
Then, when one fails, you can shut it down and it won't affect the rest of the people running other versions. | |
Tim 20-Feb-2005 [34] | [G]: I never linked a problem with tabs .... yes Anton, he has done that. |
Anton 20-Feb-2005 [35] | ok, so anyway, you're saying it's probably the last version of Core. |
Tim 20-Feb-2005 [36] | I do not believe that 'rebol on the linux server is the latest. I am using 2.5.6.3.1 (for windows) on this machine. I think I've got the latest for linux on my main workstation, but it is not available right now.... |
Chris 21-Feb-2005 [37] | Running a script as --cgi or -cs should negate the need for -q. While this looks like the line-ending transfer bug, that it does actually perform the CGI program suggests otherwise (unless I don't recall this bug correctly). |
Tim 21-Feb-2005 [38] | Chris: from what I see, it does not. Either the file has to be transfered and saved on the server with unix-style line enders or -q has to be there to make it work for me. Time will tell. Unfortunately I don't have a linux machine to download and compare.... Can you say "Heisenberg Uncertainty Principle"? :-) Anway, what works, works. I'll post more on this subject when I actually get back to programming. thanks. |
Sunanda 21-Feb-2005 [39] | Never seen that problem, Tim, despite developing in Windows and running live in various GNU/Linux/UNIX systems/ But then all the websites I support that have REBOL CGIs use a REBOL uploader rather than an FTP program -- so line endings are automatically translated. |
Chris 21-Feb-2005 [40x2] | Tim: this bit down at the bottom: Content-Type: text/html hello from D Drive |
Is this a part of your script? | |
Micha 22-Feb-2005 [42] | how do starting skrypt cgi in rebolu ? |
PeterWood 22-Feb-2005 [43] | Try this How to - Quick & Easy CGI at http://www.rebol.com/docs/cgi1.html |
Micha 22-Feb-2005 [44x5] | now.cgi [ print probe system/options/cgi] |
serv: [ open tcp://:80 ] | |
browse 127.0.0.1:80/now.cgi | |
plis help ? | |
what do to make in order to this side displayed ? | |
Graham 22-Feb-2005 [49x2] | you need to run a web server .. and just opening tcp://:80 won't do it. |
check out the web servers on rebol.org | |
Sunanda 22-Feb-2005 [51] | Or install the Apache webserver for the full works -- http://www.apache.org Or something like Xitami for 99% of what you are likely to need -- http://www.xitami.com |
Brett 2-Mar-2005 [52] | For anyone interested in getting Carl's blogger script (blog.r) to work under Cal's rebol webserver (webserv.r): (1) Cal''s script passes Carl's script a tcp connection and set's no-wait on this connection. Carl's script doesn't like that. (2) So I modified the post section of read-cgi in Carl's script as follows: set-modes system/ports/input [binary: yes lines: no no-wait: false] if integer? content-length: attempt [to integer! system/options/cgi/Content-Length] [ data: copy/part system/ports/input content-length ] ; which is based on some code Gabriele suggested a long while ago (3) Also, Cal's script was performing poorly for me (even on static files) until I modified a wait statement from [listen 0] to [listen 0.01]. So far these two changes make the combination work quite fast for me. |
Graham 2-Mar-2005 [53x3] | I wonder when Dockimbel is going to release his Cheyenne web server ... it was slated for a Dec 04 release according to his website. |
Not really CGI .. but anyone knows what is involved in writing a mail server? | |
I presume that the minimum one needs to do is to listen on port 25 and respond appropriately | |
Dockimbel 2-Mar-2005 [56] | You also need to make a DNS lookup to get MX records for destination mail servers. |
Graham 2-Mar-2005 [57] | I was thinking more of a simple mail server that only accepts mail for one's own domain. In that case, I wouldn't need to do any mail forwarding. But I guess I still need to do a DNS lookup to confirm that the server sending mail is who they claim to be. |
Henrik 22-Apr-2005 [58x2] | this is probably old, but has anyone successfully made reading GET and POST data working in webserv.r? |
I just get none! data back... | |
Volker 22-Apr-2005 [60] | read-cgi: func [/local data len] [ either system/options/cgi/request-method = "POST" [ len: to-integer system/options/cgi/content-length data: to-string copy/part system/ports/input len ] [ data: system/options/cgi/query-string ] data ] |
Henrik 22-Apr-2005 [61x2] | exactly that returns none |
hopefully it doesn't have anything to do with Windows... | |
Volker 22-Apr-2005 [63] | maybe something with set-modes too. i patched around in mine a bit. |
Henrik 22-Apr-2005 [64] | I read your post on the mailing list and tried the code you posted. same thing.... |
Volker 22-Apr-2005 [65x3] | set-modes system/ports/input [lines: false no-wait: false] ? |
and the webserv from rebol.org? | |
and a non-alpha rebol? IIRC that has problems with set-modes lines. | |
Henrik 22-Apr-2005 [68x2] | yes, latest version of webserv.r. I also tried a simple read-io system/ports/input. also tried an old rebol/core version and a newer rebol/view version. two different machines. three different browsers. same thing. |
I must have forgotten something essential... | |
Volker 22-Apr-2005 [70] | restarted webserv.r after a change? it caches scripts. |
Henrik 22-Apr-2005 [71x2] | done that many times now... |
also on different rebol instances | |
Volker 22-Apr-2005 [73] | no good idea. how do you post? |
Henrik 22-Apr-2005 [74x2] | first I want GET working, haven't tried post yet, but they should be fetched the same way, shouldn't they? if I check system/options/cgi/request-method it's none |
everything in system/options/cgi is none | |
older newer | first last |