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

Having trouble getting my rebol cgi setup

 [1/8] from: gjones05:mail:orion at: 7-Feb-2001 16:20


Hi, Rod, I run Apache 1.3.14 on Windows 98, so I guess there may be differences given the more secure nature of Win2000. If you are successfully running perl scripts from the cgi-bin directory, then I suspect you basically have done what you need to do. The only additonal factor that readily comes to mind is that most scripts will "violate" REBOL's security, so the security level would need to be changed. Try changing the #! line at the beginning of the script to: #!c:/apps/rebol/view/rebol --cgi --secure or just #!c:/apps/rebol/view/rebol -cs If you are using the #!/path/to/rebol approach, then be sure that this line: #ScriptInterpreterSource registry in the httpd.conf remains commented (meaning that the pound sign is still there). If it still hangs, then be sure that you put: print "Content-Type: text/html^/" before REBOL commands. That way, error messages will generally show up, which can be invaluable in figuring what is wrong. Finally, (and I say this for completeness because you said you were pretty new), be sure to restart Apache. Occasionally, the Windows version won't restart properly (Windows version is still considered beta), so I simply stop it, then start it fresh. If none of this helps, the let us/me know what error message is generated if any. Hope that this helps. --Scott ----- Original Message ----- From: "Rod Gaither" Sent: Wednesday, February 07, 2001 2:25 PM Subject: [REBOL] Having trouble getting my rebol cgi setup
> Hi All, > > While we are on the subject of CGI I'm having trouble getting my setup to
work at home.
> I am running win2000, Apache, Rebol/View 10.38.3.1 > > I know the basic cgi stuff is working with win2000/apache since I have run
both perl and php scripts so far.
> For a while I got internal system errors, now after changing the top of my
rebol scripts to reference rebol with the full path I get a sending request message

 [2/8] from: kenlo:pop3free at: 8-Feb-2001 9:45


2001/2/7 PM 03:25:37, Rod Gaither <[rgaither--triad--rr--com]> wrote:
>I am running win2000, Apache, Rebol/View 10.38.3.1 > ..... >that goes on forever. The top of my scripts look like this - >#!c:/apps/rebol/view/rebol --cgi
If you have associated .r files to the rebol.exe you don't even need that top line. Just search "shebang" in httpd.conf and read the comments there. Rebol scripts work right away but strange enough the #! line is still required for perl and php scripts.

 [3/8] from: rgaither::triad::rr::com at: 7-Feb-2001 21:39


Hi Scott, Ken,
>I run Apache 1.3.14 on Windows 98, so I guess there may be differences given
I am running 1.3.14 as well.
>Try changing the #! line at the beginning of the script to: >#!c:/apps/rebol/view/rebol --cgi --secure >or just >#!c:/apps/rebol/view/rebol -cs
Nope.
>If you are using the #!/path/to/rebol approach, then be sure that this line: >#ScriptInterpreterSource registry >in the httpd.conf remains commented (meaning that the pound sign is still >there).
Still there. Ken - Do I need this line active for the file association method to work? When I took the shebang line out altogether I got the Internal Error right away. It seems like Apache is trying to run it - either can't find it thus gives an error or finds it but has execution problems.
>If it still hangs, then be sure that you put: >print "Content-Type: text/html^/" >before REBOL commands. That way, error messages will generally show up, >which can be invaluable in figuring what is wrong.
There as well.
>Finally, (and I say this for completeness because you said you were pretty >new), be sure to restart >Apache. Occasionally, the Windows version won't restart properly (Windows >version is still considered beta), so I simply stop it, then start it fresh.
Glad you did! But that didn't fix it either.
>If none of this helps, the let us/me know what error message is generated if >any.
None - just says sending request to localhost... And never comes back.
>Hope that this helps.
Thanks for trying, I'll dig into it a bit and let you know what I missed. Thanks, Rod. Rod Gaither Oak Ridge, NC - USA [rgaither--triad--rr--com]

 [4/8] from: gjones05:mail:orion at: 7-Feb-2001 21:52


Rod, I relooked at all my settings and also what I wrote you. Nothing jumps right out at me, unless there is some subtle problem with file permissions in Win2k, of which I am unfamiliar. I realized that I was less than clear when I talked about restarting Apache. I should have said to restart it after making changes in the httpd.conf file. I suspect you knew that that was what I meant. And, to be sure that I am understanding, is the REBOL script in the cgi-bin directory? And is that where the Perl script is also? I assumed they were. The directory where executable scripts reside must have the option "ExecCGI" set. Typically this is the cgi-bin directory for Apache (scripts in IIS). This directory can be located most anywhere on your drive, but is best kept out of the direct www accessible path. The way to do this, and yet have it appear to be in the path, is to use ScriptAlias set for the virtual name and the actual name. The first line which is also commented shows the default directory if Apache is installed in C:\apache. This line probably points to the directory where the Perl script lies. As shown below, the original location can be commented out or changed as follows to point to a new cgi-bin directory: #ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/" ScriptAlias /cgi-bin/ "C:/path/to/your/website/cgi-bin/" The following section allows CGI scripts to be executed in the cgi-bin directory. IN this example, I have commented out the default, and set the Options to ExecCGI in the new ScriptAlias directory. # # "C:/Apache/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # #<Directory "C:/Apache/cgi-bin"> # AllowOverride None # Options None # Order allow,deny # Allow from all #</Directory> <Directory "C:/path/to/your/website/cgi-bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> Save the httpd.conf and start/restart Apache. Check your script. If it doesn't work, try the following VERY simple script "clock.r" (or "clock.cgi" if preferred) saved in the cgi-bin directory (which is presumably where the Perl script resides): #!c:/apps/rebol/view/rebol -cs REBOL [Title: "Clock"] print "Content-Type: text/html^/" print ["The time is now" now/time] Good luck and let us know what you find. --Scott

 [5/8] from: tim:johnsons-web at: 7-Feb-2001 19:59


Hi All; On Wed, 07 Feb 2001, you wrote: Not addressing the problem as much as taking another approach and sharing what works for me I do rebol cgi script on both Windows NT and Linux, testing on both. I target most work for Apache Servers. If I test cgi on Windows NT using PWS as the server software, I *don't* have to modify my she-bang line because settings are in the registry. If you are targeting your script for an IIS web server on an Win NT server, than the same configuration is true, I believe. Apache is trivial to set up on Linux. PWS is trivial to set up on Windows. There seems to be a lot of problems with setting up Apache on Windows.
> >I run Apache 1.3.14 on Windows 98, so I guess there may be
d>ifferences given -- Elan was worked both ends out pretty well, I think. Have any of you got his book.? I hope I'm being clear here.... If not my apologies. I've been in "code city" all day and feeling a bit burned out. Tim Johnson ----------- Of all manifestations of power, restraint impresses the most. -Thucydides

 [6/8] from: rgaither:triad:rr at: 8-Feb-2001 8:16


>I realized that I was less than clear when I talked about restarting Apache. >I should have said to restart it after making changes in the httpd.conf >file. I suspect you knew that that was what I meant.
Yes, not a problem.
>And, to be sure that I am understanding, is the REBOL script in the cgi-bin >directory? And is that where the Perl script is also? I assumed they were.
They are.
>Save the httpd.conf and start/restart Apache. Check your script. If it >doesn't work, try the following VERY simple script "clock.r" (or "clock.cgi"
<<quoted lines omitted: 5>>
>print ["The time is now" now/time] >Good luck and let us know what you find.
Will do. I do have Elan's book so I will crack that open as well to see what I'm missing. Thanks, Rod. Rod Gaither Oak Ridge, NC - USA [rgaither--triad--rr--com]

 [7/8] from: rgaither:triad:rr at: 8-Feb-2001 8:19


Hi Tim,
>Not addressing the problem as much as taking another approach and sharing what >works for me
A good option to have! I am not targeting anything at this point, just want to be able to play around with some server side scripting options.
>Elan was worked both ends out pretty well, I think. Have any of you got his >book.?
I do and I haven't looked at it on CGI yet. Thanks for the tip.
>I hope I'm being clear here.... If not my apologies. I've been in "code city" >all day and feeling a bit burned out.
:-) Thanks, Rod. Rod Gaither Oak Ridge, NC - USA [rgaither--triad--rr--com]

 [8/8] from: rgaither:triad:rr at: 7-Feb-2001 15:25


Hi All, While we are on the subject of CGI I'm having trouble getting my setup to work at home. I am running win2000, Apache, Rebol/View 10.38.3.1 I know the basic cgi stuff is working with win2000/apache since I have run both perl and php scripts so far. For a while I got internal system errors, now after changing the top of my rebol scripts to reference rebol with the full path I get a sending request message that goes on forever. The top of my scripts look like this - #!c:/apps/rebol/view/rebol --cgi I've also edited my httpd.conf file to add an AddType line for .r files. I'm brand new to this so don't make any assumptions that I've done the basics right! :-) Thanks, Rod. Rod Gaither Oak Ridge, NC - USA [rgaither--triad--rr--com]

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