Classic CGI on Win

Andre Garzia andre at andregarzia.com
Mon Aug 9 08:07:01 CDT 2010


Malte,

I think you're in for a wild ride here my friend. I never used CGI on
windows machines but if you can run apache then it should be easier
than trying this kind of stunt with IIS.

Below I will reproduce the steps needed. I haven't tried them I am
just converting the common steps for other languages to Rev. It should
work.

After installing apache, look for httpd.conf in the conf folder and
edit it like this:

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/CGI-bin "
    AllowOverride None
    Options None    <-- change this line to 'Options ExecCGI'.
    Order allow,deny
    Allow from all
</Directory>

After setting the ExecCGI option to the CGI-Bin folder. You need to
set your handlers. Search on httpd.conf for "CGI", you will find a
commented AddHandler entry that you need to uncomment.

  #AddHandler CGI-script .cgi

becomes

  AddHandler CGI-script .cgi

This binds the .cgi extension to a CGI script. After that restart
apache. Copy your Rev engine (3.5) to the CGI-Bin folder. Try it with
a file hello.cgi with the following content:

  #!"C:/Program Files/Apache Software
Foundation/Apache2.2/CGI-bin/revolution.exe" -cs
  on startup
    put "Content-type: text/plain" & crlf & crlf
    put "hello world!" & crlf
  end startup

Then you call "http://localhost/cgi-bin/hello.cgi"

I have never tested Apache or CGI under windows but that is the
standard recipe. If you manage to get that working you will stumble in
the database connection for it will not work out of the box. You will
need to set the databasedriverspath by hand in the startup handler and
might need to bind revdb.dll there as well.

andre



On Mon, Aug 9, 2010 at 8:19 AM, Malte Pfaff-Brill
<revolution at derbrill.de> wrote:
>
> Hi folks,
>
> as we do not yet have a win version of revServer, I need to set up a CGI on Win Server 2003 (if possible)
>
> Requirements are:
>
> Needs to work with local postGreSQL DB
> Needs to work with revXML
>
> Is this possible? If so, which components do I need to install where? Server can run Apache.
>
> Cheers,
>
> Malte_______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution



--
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list