本文介绍了在 Windows Apache 上安装 XAMPP Mercurial -->HgWebDir.cgi 脚本错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过 XAMPP Apache 通过 CGI Python 脚本 hgwebdir.cgi 发布多个现有的 mercurial 存储库位置...如本教程中所述 https://www.mercurial-scm.org/wiki/HgWebDirStepByStep

I try to publish multiple existing mercurial repository-locations though XAMPP Apache via CGI Python script hgwebdir.cgi ... as in this tutorial https://www.mercurial-scm.org/wiki/HgWebDirStepByStep

当我尝试使用浏览器访问存储库路径时,我从 apache 错误日志中收到以下错误:

I get the following error from the apache error logs, when I try to access the repository path with a browser:

脚本头提前结束:hgwebdir.cgi

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
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216]     test = c:/hostdir/mercurial/test/
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216]             ^
[Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] SyntaxError: invalid syntax

这是脚本失败的文件路径(如果我删除它,我会得到一个空的 HTML 页面,其中没有可视元素):

This is the path of the file where the script fails (and if I remove it, I get an empty HTML page shown with no visual elements in it):

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

有人知道吗?

推荐答案

好吧,毕竟这只是一大堆目录位置问题和一个大版本问题(需要使用 Python 2.6 和 Mercurial 1.5.1).现在可以工作了.如果我碰巧写了一个完整的 windows 指南,我会添加评论.

Okay, after all it was just a whole lot of directory-location-problems and a big version-problem (needed to use Python 2.6 with Mercurial 1.5.1). Got it working now. If I happen to write a full windows-guide, I'll add a comment.

这篇关于在 Windows Apache 上安装 XAMPP Mercurial -->HgWebDir.cgi 脚本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-16 14:11