【问题标题】:WebSVN doesn't recognize repositoriesWebSVN 不识别存储库
【发布时间】:2016-06-21 12:50:00
【问题描述】:

我正在尝试安装 WebSVN。到目前为止一切正常,但我的存储库无法识别。

在我的用户文件夹/home/svnsvn 是用户名)中,我有几个存储库,我希望它们都出现在 WebSVN 中。

这是我的config.php

<?php

$config->setSVNCommandPath('/usr/bin');
$config->setDiffPath('/usr/bin');
$config->setEnscriptPath('/usr/bin');
$config->setSedPath('/bin');
$config->setTarPath('/bin');
$config->setGZipPath('/bin');
$config->parentPath('/home/svn');
$config->addTemplatePath($locwebsvnreal.'/templates/calm/');
$config->addTemplatePath($locwebsvnreal.'/templates/BlueGrey/');
$config->addTemplatePath($locwebsvnreal.'/templates/Elegant/');
$config->addInlineMimeType('text/plain');
$config->setMinDownloadLevel(2);
$config->useGeshi();

set_time_limit(0);
$config->expandTabsBy(8);

$extEnscript[".pl"] = "perl";
$extEnscript[".py"] = "python";
$extEnscript[".sql"] = "sql";
$extEnscript[".java"] = "java";
$extEnscript[".html"] = "html";
$extEnscript[".xml"] = "html";
$extEnscript[".thtml"] = "html";
$extEnscript[".tpl"] = "html";
$extEnscript[".sh"] = "bash";

如果我在浏览器中打开 WebSVN,它会显示 HTTP ERROR 500。如果我将$config-&gt;parentPath('/home/svn'); 更改为$config-&gt;parentPath('/home');,它会一直告诉我:

请在 include/config.php 中使用 $config->parentPath 或 $config->addRepository。看安装 指南了解更多详情。

我错过了什么吗?

【问题讨论】:

    标签: php svn repository websvn


    【解决方案1】:

    一切就绪后,我也一直遇到这个问题。浏览 Apache 错误日志文件时,我遇到了一个关于缺少 xml 函数的有趣信息(使用 Ubuntu 16.04 LTS,默认的 php 安装,当时是 7.0)。这可以通过安装 php-xml 来轻松解决

    apt-get install php-xml -y

    希望这也是你的情况。

    【讨论】:

      【解决方案2】:

      除了使用 parentPath 告诉 WebSVN 在哪里可以找到您的存储库(这只是让您缩短以后的路径),您必须为每个要显示在 WebSVN 主页上的存储库创建一个条目(使用 addRepository)。

      addRepository() 函数有两个参数。第一个是可见名称,第二个是 SVN 存储库的路径。

      参考链接:Use Subversion, Apache, and WebSVN to view your repositories

      (我设置 WebSVN 已经有一段时间了,但我确实必须单独列出每个。)

      【讨论】:

        【解决方案3】:

        Add a repository using the below command

        $ svnadmin create --fs-type fsfs /home/svn/FirstRepo
        

        那么 在您的 config.php 中添加一行与您的第一个存储库,如下所示。

        $config->addRepository("FirstRepo", "file:///home/svn/FirstRepo");
        

        同时安装 php-xml。

        $ sudo apt install -y php-xml 
        

        重启apache2服务器。

        $ sudo apache2 restart
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2010-10-30
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2022-07-01
          相关资源
          最近更新 更多