Thanks Tony, that worked.

For reference this cgi works (returning the "fossil new" help text).

#!/bin/sh
>
> echo "Content-type: text/plain; charset=iso-8859-1"
> echo
>
> echo Debugging and learning bash cgi scripting:
> echo $GATEWAY_INTERFACE
> unset GATEWAY_INTERFACE
>
> fossil help new
> echo $GATEWAY_INTERFACE
> echo End
>

Note: if you are on a shared host, you may need to replace "fossil help new"
with "/path-to-fossil/fossil help new". This is because the cgi script will
notpick up any .bash_profile settings you may have. (or set your $PATH env
variable inside the cgi to wherever you have installed fossil)

NB - is there anyway I can contribute to the documentation?

On 7 March 2011 16:48, Tony Perovic <[email protected]> wrote:

> Looking at the source code, it looks like Fossil goes into CGI mode when it
> sees that the GATEWAY_INTERFACE is defined or the cgi command line parameter
> is specified.
>
> Try clearing GATEWAY_INTERFACE.
>
> Tony Perovic
> Compumation, Inc.
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Gé Weijers
> Sent: Monday, March 07, 2011 10:25 AM
> To: [email protected]
> Subject: Re: [fossil-users] Basic question: how to create fossil web
> service using bash cgi
>
>
>
> On Sun, 6 Mar 2011, David Bovill wrote:
>
> > My bash scripting is very basic. I've been trying to create some cgi's on
> > the server that will let me create new fossil repos. I've this test cgi,
> and
> > am unable to issue the commands to fossil that I am able to in the
> > terminal.
>
> fossil sees that the environment contains CGI variables and switches to
> CGI mode. To make this work you'll have to purge the environment, I'm not
> quite sure which variable you need to remove.
>
> Ge'
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to