Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Running rebol as cgi on Win NT

 [1/11] from: hallvard::ystad::helpinhand::com at: 31-Aug-2001 14:37


Hi folks, I'm trying to run rebol as a cgi-script on a windows NT machine. My script starts like this: #!rebol -cs REBOL [ Title: "Here's the title" ] but I keep getting this message in the error log: [Sat Sep 01 14:00:21 2001] [error] [client 127.0.0.1] malformed header from script. Bad header=/apache/cgi-bin/test4.r could : /apache/cgi-bin/test4.r Anyone got a clue? ~H

 [2/11] from: ammoncooke:yah:oo at: 31-Aug-2001 7:13


#!rebol -cs should read: #!<path to rebol> -cs on my machine that would be: #!/c/rebol/view/rebol -cs Maybe you already new this, but #!rebol -cs, looked suspicious. HTH Enjoy!! Ammon ----- Original Message ----- From: "Hallvard Ystad" <[hallvard--ystad--helpinhand--com]> To: <[rebol-list--rebol--com]> Cc: <[anders--helpinhand--com]> Sent: Friday, August 31, 2001 5:37 AM Subject: [REBOL] Running rebol as cgi on Win NT
> Hi folks, > > I'm trying to run rebol as a cgi-script on a windows NT machine. My script
starts like this:
> #!rebol -cs > REBOL > Title: "Here's the title" > ] > but I keep getting this message in the error log: > [Sat Sep 01 14:00:21 2001] [error] [client 127.0.0.1] malformed header
from script. Bad header=/apache/cgi-bin/test4.r could : /apache/cgi-bin/test4.r

 [3/11] from: petr:krenzelok:trz:cz at: 31-Aug-2001 14:55


Hallvard Ystad wrote:
> Hi folks, > > I'm trying to run rebol as a cgi-script on a windows NT machine. My script starts like this: > #!rebol -cs
I think you have to specify full path where your rebol.exe is located in your system, e.g. #!c:/rebol/rebol.exe -cs If it will not work for you, try search or FAQ section on rebol.com .... -pekr-

 [4/11] from: allenk:powerup:au at: 31-Aug-2001 23:36


----- Original Message ----- From: "Hallvard Ystad" <[hallvard--ystad--helpinhand--com]> To: <[rebol-list--rebol--com]> Cc: <[anders--helpinhand--com]> Sent: Friday, August 31, 2001 10:37 PM Subject: [REBOL] Running rebol as cgi on Win NT
> [Sat Sep 01 14:00:21 2001] [error] [client 127.0.0.1] malformed header
from script. Bad header=/apache/cgi-bin/test4.r could : /apache/cgi-bin/test4.r Are you printing the Content-Type, before anything else is printed? Cheers, Allen K

 [5/11] from: hallvard:ystad:helpinhand at: 2-Sep-2001 15:47


Thanks for your hints, folks, but I'm afraid they don't solve the problem. We're specifying the full path, and we're also printing the Content-Type before anything else is printed. The script we're trying to run works perfectly well from the command prompt, and it runs 100% fine as a cgi script on a Mac OS X Server. So what could be the problem? What has Win NT got against running rebol as cgi? Perl as cgi works fine on the same machine! How about the error message, can anyone explain to me in detail what it tries to say? I get it as far as to "malformed header from script", but from there on: mystery! (Here it is again): [Sat Sep 01 14:00:21 2001] [error] [client 127.0.0.1] malformed header from script. Bad header=/apache/cgi-bin/test4.r could : /apache/cgi-bin/test4.r Du skrev (14.55 31.08.2001):

 [6/11] from: pa:russo:perd at: 2-Sep-2001 16:50


>Thanks for your hints, folks, but I'm afraid they don't solve the problem. >We're specifying the full path, and we're also printing the
<<quoted lines omitted: 6>>
>it tries to say? I get it as far as to "malformed header from >script", but from there on: mystery! (Here it is again):
[Sat Sep 01 14:00:21 2001] [error] [client 127.0.0.1] malformed header from script. Bad header=/apache/cgi-bin/test4.r could : /apache/cgi-bin/test4.r Sometimes I get the same error when I forget to convert the <newline> saving mode in my text editor from Mac (where I develop) to Unix (where my CGIs run). If your CGI works fine on MacOS X Server and not on WinNT, perhaps you have a similar problem. HTH -- -- dr. Paolo Russo [pa--russo--perd--com] http://www.perd.com cell. 380 70 17 641

 [7/11] from: hallvard:ystad:helpinhand at: 2-Sep-2001 18:07


OK, we solved the problem. Unlike for perl, where /cgi-bin/ is enough, rebol seems to demand that the script alias in httpd.conf be c:/apache/cgi-bin/. Simple. But how could one know? ~H Paolo Russo skrev (16.50 02.09.2001):

 [8/11] from: ric:getorbital at: 2-Sep-2001 10:05


Alternatively, you could add "AddHandler cgi-script .r" to your httpd.conf file instead of using ScriptAlias. I had better luck with that. -- Ric

 [9/11] from: john:thousand-hills at: 3-Sep-2001 0:01


Actually, this is in the Rebol setup procedures in the Official Book, I don't know about "Dummies".. John At 06:07 PM 9/2/2001 +0200, you wrote:

 [10/11] from: hallvard:ystad:helpinhand at: 3-Sep-2001 8:43


Sorry, should have looked closer at the book. But I still think it's a bit dumb that I cannot use the same httpd.conf on windows as I use on Mac OS X and SuSE linux. ~H Du skrev (07.01 03.09.2001):

 [11/11] from: john:thousand-hills at: 3-Sep-2001 5:48


Hallvard: I know. I am running NT with Smabar, Rebols runs without installation. We installed it at Capmetro in Austin on NT-4 with IIS-4 last week and put the book aside. There were several important steps not covered. I guess this is because we always "bitch" but do not document the problems. Once I had it correctly installed, the same path name conventions worked, The one difference that I noticed, and it has caused me the largest cross-platform difficult is the HTML file handle. While Sambar doesn't care, IIS needs the ;print "Content-Type: text/html^/^/" I place it inside the semicolon so it doesn't actually print, and it works. I am proficient in PERL, but I can do things with REBOL that I would never have done in PERL, so a little bitching is worth the trouble. Thans why I like this forum (Sambar has one also) -you don't get support like this from Microsoft even though we spends thousands for it. /john At 08:43 AM 9/3/2001 +0200, you wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted