XAMPP Mercurial for Windows Apache & # 8594; HgWebDir.cgi Script Error

I am trying to post multiple existing mercury repository addresses though XAMPP Apache via CGI Python script hgwebdir.cgi ... as in this tutorial https://www.mercurial-scm.org/wiki/HgWebDirStepByStep

I am getting the following error from apache error logs when I try to access the repository path in the browser:

Premature end of script headers: hgwebdir.cgi

[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] Premature end of script headers: hgwebdir.cgi
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216]   File "C:/hostdir/xampp/cgi-bin/hg/hgwebdir.cgi", line 39\r
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216]     test = c:/hostdir/mercurial/test/\r
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216]             ^\r
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] SyntaxError: invalid syntax\r

      

This is the path to the file where the script crashed (and if I delete it I get a blank HTML page shown with no visuals):

[paths]
test = c:/hostdir/mercurial/test/
/hg = c:/hostdir/mercurial/**
/ = c:/hostdir/mercurial/

      

Does anyone know me?

+1


a source to share


3 answers


Okay, in the end it was just a bunch of directory layout issues and a big version issue (for using Python 2.6 with Mercurial 1.5.1). It works now. If I can manage to write a complete guide to the window, I'll add a comment.



0


a source


This is just a wild ass, but I suspect line endings in your ini file might be messed up. You can try opening your ini file in something like VIM and see if there are any scared characters in there. It sucks that in 2010 we still have to consider these things, but that's what it is. / Shrug



0


a source


I only have one version compatibility issue. Tried with Mercurial 1.8 and Python 2.7, it didn't work.

Finally, I had to use Python 2.6.6. worked really well this time :).

0


a source







All Articles