World: r3wp
[CGI] web server issues
newer | last |
Chris 2-Feb-2005 [1x2] | Why Web Applications Can be Problematic and Unreliable -- http://www.sys-con.com/story/?storyid=47364&de=1 |
Perhaps this would sit well in other groups too... | |
Rondon 16-Feb-2005 [3x3] | is there anybody trying to use fastcgi scripts with encaped scripts ? |
I having problems.. It works fine without encap.. | |
When I try to encap it, it doesn't run anymore. | |
Graham 16-Feb-2005 [6x2] | is that rebol fastcgi ? |
and why would it work with encapped scripts? | |
Rondon 17-Feb-2005 [8x2] | What I'm saying is that even with cgi scripts encapsulated don't work.. |
the problem is with the encapç | |
Sunanda 17-Feb-2005 [10] | Hiw are you doing the shebang with an encapped script? |
Rondon 17-Feb-2005 [11] | Pardon, I didn't understand what you mean.. |
PeterWood 17-Feb-2005 [12] | Rondon: I think he's referring to the fact that the Shebang, ( the first line of the CGI) is a Shell command to tell the OS to load the Rebol interpreter. But I could be wrong. |
Rondon 17-Feb-2005 [13x3] | Oh yeah.. now I see.. |
well, my cgi scripts run well.. very well.. I just tried to encap them and.. :-( | |
stopped of running. | |
Sunanda 17-Feb-2005 [16] | If they are encapped, is the shebang encapped too? If so, how does the websever know to run my-encap.exe ? |
Rondon 17-Feb-2005 [17] | no Sunanda.. I did a .fcgi file that calls the rebol .exe file. |
Sunanda 17-Feb-2005 [18] | Does this help? http://www.rebol.com/docs/sdk/encap.html Note the encap [cgi] header. |
Rondon 19-Feb-2005 [19] | the problem was because I was not including the source functions.. #include prots.r |
Tim 20-Feb-2005 [20x3] | Take a look at http://www.johnsons-web.com/cgi-bin/test.r.This is very bizarre! If you use netscape, you will see the entire usage message from rebol displayed prior to the mime-type header. If you use IE, it is likely that some but not all of these effects will be obfuscated, but you should be able to see the entire output if you view the source. The sources from the script is being sent from a windows computer to a linux server. Now, if I use a FTP client like WS_FTP which as a "ascii" mode, it automatically converts line enders to unix style, and this problem does not occur. |
Does anyone know of a solution for this. Thanks, tim | |
Holy moly, I just changed the rebol command line switch to -csq (q to suppess usage) and the problem went away. I will upload to http://www.johnsons-web.com/cgi-bin/test1.rso that you can see the difference. | |
Anton 20-Feb-2005 [23x3] | All I saw in Firefox and rebol a minute ago was "Hello from D drive". |
test1.r has the usage. | |
From memory, rebol converts lineendings for you, if you upload via FTP across different platforms. That's what I used to do when it was a problem. | |
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 | |
newer | last |