View Ticket
Not logged in
2010-11-09
09:01 Ticket [e49f245975] Add '-nocgi' option status still Fixed with 2 other changes artifact: 83a941ccc3 user: ron
08:59
fix [e49f245975f89a8a9c006ec224eed48c8ad77593] by adding -nocgi option check-in: 1b883d49cf user: ron tags: trunk
2010-11-05
09:53 Ticket [e49f245975] Add '-nocgi' option status still Fixed with 1 other change artifact: 64c39b43eb user: drh
05:46 Ticket [e49f245975]: 2 changes artifact: 78849ffa3a user: ron
2010-11-04
19:58 Fixed ticket [e49f245975]. artifact: 0e5ee7820d user: drh
19:58
Do not assume that the method is CGI just because the GATEWAY_INTERFACE environment variable is set. Only do CGI if GATEWAY_INTERFACE is set and there either is no argument specified, or the specified argument is not a valid command. Ticket [e49f245975f89a8a9] check-in: dcf839e4a6 user: drh tags: trunk
13:24 New ticket [e49f245975] Add '-nocgi' option. artifact: bfaf8f998b user: ron

Ticket UUID: e49f245975f89a8a9c006ec224eed48c8ad77593
Title: Add '-nocgi' option
Status: Fixed Type: Feature_Request
Severity: Minor Priority:
Subsystem: Resolution: Fixed
Last Modified: 2010-11-09 09:01:37
Version Found In:
Description & Comments:
I just encountered a small issue using fossil within a php script. Using the php "exec()" function to run fossil -- to add a ticket to a repository -- I was unable to do it directly because fossil starts in cgi mode.

The way around was to execute fossil from a shell script which "unset"s GATEWAY_INTERFACE. This took me a bit to figure out, and seems unnecessary.

So I suggest adding a '-nocgi' option so that it is easier to run fossil from within a cgi-script (without using fossil in cgi mode)


ron added on 2010-11-05 05:46:45:
This fix seems to make my server not work any longer.

It is configured as a script which is executed from the server, and that server is:

#!/path/to/fossil
directory: /home/my/fossils
notfound: http://somewhere.else/

What is happening is a 'server misconfigured' message when I access the page now; reverting to ver cb2ff51 fixes the problem. Adding 'cgi' as a parameter on the #! line helps, but I lose the css.


ron added on 2010-11-09 09:01:37:
Reverted your fixes, because they cause problems with certain CGI scripts scenarios (e.g. if the CGI script is named a valid fossil command prefix).

Instead, check for '-nocgi' option and disable automatic 'cgi' if it is present.

[1b883d49cf0885c74f1324b545caf28aafec385a]