Fossil SCM

Add '-nocgi' option

Fixed

e49f245975f89a8… · opened 15 years, 5 months ago

Type
Feature_Request
Priority
Severity
Minor
Resolution
Fixed
Subsystem
Created
Nov. 4, 2010 1:24 p.m.

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]


Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button