Home   Archive   Permalink



Is rebol compatible with IIS 7 ?

It seems I cannot make it run as cgi whereas I could make perl run see
    
http://stackoverflow.com/questions/3223556/how-to-configure-cgi-on-iis-7

posted by:   reboltutorial       11-Jul-2010/15:15:55-7:00



It should be. But on IIS7 it is very different and a little bit difficult to setup CGI on IIS7.
We even faced lots of problems when setup PHP as CGI on IIS7 on our customers which is very easy on IIS5.
I'll try that tomorow.

posted by:   Endo       12-Jul-2010/17:49:22-7:00



Did you manage to make rebol work on IIS 7 finally ?

posted by:   reboltutorial       28-Nov-2010/17:50:13-8:00



Unfortunately I couldn't make it run.
I followed http://www.wrensoft.com/zoom/support/faq_cgi_iis.html there are good explanations.
But I constantly get "500 internal server error"
Sorry :(

posted by:   Endo       30-Nov-2010/8:55:28-8:00



Hi, I finally got some results. I examined all the logs by using Process Monitor (from SystemInternals) and I found that IIS doesn't put the script path into command line when starting core.exe
    
I added core.exe from "Add Module Mappings" dialog. I used this form:
    
     c:\core.exe -cs %1 %1
    
But it looks "core.exe -cs " in process monitor.
Then I changed the commandline argument to this:
    
     C:\core.exe -cs --script C:\inetpub\wwwroot\test.r
    
Then test.r works well! I tried several different combinations like.
    
     c:\core.exe "-cs %1 %1"
     c:\core.exe -cs "%1 %1"
     c:\core.exe -cs %1 %1
     c:\core.exe -cs %1
    
None of them work, I hope I'll solve this soon.

posted by:   Endo       13-Dec-2010/10:46:24-8:00



Yes!! I made it work!!
Here is the complete solution. I think we should put this on rebol.net as an article. So many people can fail to run Rebol under IIS7 as a CGI module.
    
Open Server Manager from Administrative Tools.
Add role "Web Server (IIS)"
Try http://localhost/ from your browser. You should see the IIS7 Welcome Page.
    
Copy core.exe to c:\ (or somewhere else), right click on core.exe and open Properties window, give Read & Execute access to IUSR_xxxx under Security tab. (If you've any problem, try to give Read & Execute for Everyone)
    
Open "Internet Information Services (IIS) Manager" from Administrator Tools.
    
Click on Default Web Sites, double click on Handler Mappings, click on Add Module Mapping from the right panel and type the followings:
    
Request Path: *.r
Module: c:\core.exe -cs %s %s
Name: Rebol
    
Create a test.r file under wwwroot folder. My test.r file contains following script:
    
     R E B O L [Title: "Server Time"]
     print "content-type: text/html^/"
     print [<HTML><BODY>]
     print ["Date/time is:" now]
     print [</pre></BODY></HTML>]
    
And type http://localhost/test.r on your browser.
If everything goes well then it should work.
    
If you are trying with View.exe then you may need to put --noinstall to command line, otherwise when View start with IUSR_xxx user account it will open desktop & installation window and it stays background (you can see it from Task Manager).
    
     c:\view.exe -csi %s %s
    
You may need to put double quotes around %s if your script is in a path with spaces. Use the following form:
    
     c:\core.exe -cs "%s %s"
    
Instead of this:
    
     c:\core.exe "-cs %s %s" (<-- this won't work!)

posted by:   Endo       13-Dec-2010/11:13:58-8:00



And select Yes when Add Script Map dialog box appears.
    
If you did not, then do it manually: click on computer name in IIS Manager, open ISAPI and CGI Restrictions window and add core.exe with same notation:
    
     c:\core.exe -cs "%s %s"
    


posted by:   Endo       13-Dec-2010/11:22:48-8:00