Submitted by vincellc on Thu, 12/08/2016 - 11:46 Pro Licensee
When I try to access gitweb.cgi from a web browser I get the following error on page:
Software error: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at gitweb.cgi line 1193.
My Apache2 error log shows:
[Thu Dec 08 09:58:46.557787 2016] [cgi:error] [pid 3872] [client 174.67.159.4:3533] AH01215: [Thu DecĀ 8 09:58:46 2016] gitweb.cgi: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at gitweb.cgi line 1193.: /home/vcadmin/domains/pjc.domain.net/public_html/git/gitweb.cgi
I have included my gitweb.cgi (with domain renamed for security). It appears that all the paths are pointing to the correct locations. I have tried removing /usr/share/gitweb/gitweb.cgi (from a forum reply) but it did not have any effect. I have Git working with HTTPS and Smart HTTP, I have not been able to get gitweb.cgi to work since first installing Git on Virtualmin.
Files:
Status:
Active
Comments
Submitted by JamieCameron on Thu, 12/08/2016 - 18:27 Comment #1
Try editing
/home/vcadmin/domains/pjc.domain.net/public_html/git/gitweb.cgi
and changingdefined(@something)
to just@something
Submitted by dyvel on Fri, 09/15/2017 - 06:23 Pro Licensee Comment #2
Got this error when trying to setup git: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at gitweb.cgi line 1193.
Removed defined from these lines from the gitweb.cgi file: line 1193 same for line 1246 same for line 1324 same for line 1376
Then got this error: Can't locate object method "startform" via package "CGI" at gitweb.cgi line 409.
Error is a typo. To fix the typo: replace startform with start_form on line 409
On Ubuntu 16.04 - seems like an update to git module is needed?
Submitted by JamieCameron on Sat, 09/16/2017 - 13:15 Comment #3
Which version of the Virtualmin Git plugin are you running there?