Windows Apache 上的 XAMPP Mercurial 安装 --> HgWebDir.cgi 脚本错误

发布于 2024-08-29 17:26:02 字数 1028 浏览 1 评论 0原文

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

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

Premature end of脚本标头: 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

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

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

有人对我有线索吗?

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

I get the following error from the apache error logs, when I try to access the repository path with a 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 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/

Does anybody have a clue for me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

快乐很简单 2024-09-05 17:26:03

这只是一个疯狂的猜测,但我怀疑你的 ini 文件中的行结尾可能会混乱。您可能想尝试在 VIM 之类的工具中打开 ini 文件,看看其中是否有任何时髦的字符。很糟糕的是,2010 年我们仍然要考虑这些事情,但事实就是如此。/耸肩

this is just a wild ass guess but I suspect the line endings in your ini file may be messed up. You may want to try opening your ini file in something like VIM and see if there's any funky characters in there. It sucks that in 2010 we still have to consider these things, but it is what it is./shrug

伤感在游骋 2024-09-05 17:26:03

好吧,毕竟这只是一大堆目录位置问题和一个大版本问题(需要使用 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.

强者自强 2024-09-05 17:26:03

我刚刚遇到了相同的兼容性版本问题。尝试使用 Mercurial 1.8 和 Python 2.7,但没有成功。

最后,我不得不使用Python 2.6.6。这次效果很好:)。

I've just been having the same compatibility versions issue. Tried with Mercurial 1.8 and Python 2.7, it didn't work.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文