Add Troubleshooting section to README.
[viewgit.git] / doc / HOWTO-IIS-php-fastcgi
blobb1defa58b934386382de42524a105e26762066c8
1 The following howto for running ViewGit on Windows with IIS and php-fastcgi has
2 been provided by Troy Hamilton <troy.a.hamilton@gmail.com>:
3 --------------------------------------------------------------------------------
5 I didn't see any information on the ViewGit sourceforge page about running it
6 on Windows with IIS and php-fastcgi, so I thought I'd send a note describing
7 the methods I employed to get it working.  (And it works really well, by the
8 way.)
10 First, I set up php-fastcgi for IIS as described here:
11 http://www.iis.net/expand/fastcgi
13 Next, I had to grant the Internet Guest Account read and execute permission to
14 cmd.exe in order to avoid php "Unable to fork" errors:
15 http://www.somacon.com/p255.php
17 Other than that, the included README file was sufficient, but I didn't mess
18 with any url rewriting, though.
20 I did have to make a couple of changes in the php code for the windows
21 environment, however:
23 cmd.exe treats the hat symbol (^) as an escape character, so on line 219 of
24 index.php, I had to change:
25 $text = git_diff($page['project'], "$hash^", $hash);
27 to this:
28 $text = git_diff($page['project'], "$hash~1", $hash);
30 I also had to do the same on line 235.
32 Similarly, I had to add a ^ character to escape the pipe on line 98:
33 run_git_passthru($project, "archive --format=tar $tree ^|gzip");
35 I also installed the gnuwin32 tools on the server for gzip.exe (tar.gz archives) and patch.exe.