gitperlgitweb

XML parsing error when trying to configure gitweb after installing BugZilla perl dependencies


I installed and configured git, gitolite and gitweb on a personal sever it works fine at the begining and I had my web view on my repositories. but when I tried to install BugZilla (with all perl dependencies) I had a an error message on the racine of my gitweb URL:

XML Parsing Error: XML or text declaration not at start of entity Location: http://xxx.xxx.xx.xx/gitweb/ Line Number 22, Column 1:

The generated web page (firebug):

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface version 1.7.10.4, (C) 2005-2006, Kay Sievers <kay.sievers@vrfy.org>, Christian Gierke -->
<!-- git core binaries version 1.7.10.4 -->
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
<meta name="generator" content="gitweb/1.7.10.4 git/1.7.10.4"/>
<meta name="robots" content="index, nofollow"/>
<title>xxx.xxx.xx.xx Git</title>
<link rel="stylesheet" type="text/css" href="static/gitweb.css"/>
<link rel="alternate" title="xxx.xxx.xx.xx Git projects list" href="/gitweb/?a=project_index" type="text/plain; charset=utf-8" />
<link rel="alternate" title="xxx.xxx.xx.xx Git projects feeds" href="/gitweb/?a=opml" type="text/x-opml" />
<link rel="shortcut icon" href="static/git-favicon.png" type="image/png" />
</head>
<body>
<div class="page_header">
<a href="http://git-scm.com/" title="git homepage"><img alt="git" class="logo" height="27" src="static/git-logo.png" width="72" /></a><a href="/gitweb/">projects</a> / </div>
<div class="projsearch">
Content-type: text/html

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface version 1.7.10.4, (C) 2005-2006, Kay Sievers <kay.sievers@vrfy.org>, Christian Gierke -->
<!-- git core binaries version 1.7.10.4 -->
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
<meta name="generator" content="gitweb/1.7.10.4 git/1.7.10.4"/>
<meta name="robots" content="index, nofollow"/>
<title>xxx.xxx.xx.xx Git</title>
<link rel="stylesheet" type="text/css" href="static/gitweb.css"/>
<link rel="shortcut icon" href="static/git-favicon.png" type="image/png" />
</head>
<body>
<div class="page_header">
<a href="http://git-scm.com/" title="git homepage"><img alt="git" class="logo" height="27" src="static/git-logo.png" width="72" /></a><a href="/gitweb/">projects</a> / </div>
<div class="page_body">
<br /><br />
500 - Internal Server Error
<br />
<hr />
Can't locate object method &quot;startform&quot; via package &quot;CGI&quot; at /usr/share/gitweb/index.cgi line 5267.

</div>
<div class="page_footer">
<a class="rss_logo" href="/gitweb/?a=opml">OPML</a> <a class="rss_logo" href="/gitweb/?a=project_index">TXT</a>
</div>
<script type="text/javascript" src="static/gitweb.js"></script>
<script type="text/javascript">
window.onload = function () {
    var tz_cookie = { name: 'gitweb_tz', expires: 14, path: '/' };
    onloadTZSetup('local', tz_cookie, 'datetime');
};
</script>
</body>
</html>

I think that this error is due to the perl modules installed when I tried to install BugZilla.

How to de-install all perl modules and re-install default modules?

I use Apache as web server.

Does anyone have any idea on how to solve this?

UPDATE1:

My perl version is : v5.14.2

CGI version: 4.21


Solution

  • Had the same error message for gitweb with apache on Ubuntu after upgrading to 16.04. As stated by Slion, changing the two instances of "startform" to "start_form" in gitweb.cgi worked and I could use gitweb as before.