tomgracey has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
I am putting together an ajax web application and have decided to use Git behind the scenes.
Git::Wrapper seems the obvious choice but I am having some trouble when this is used through apache. E.g. if I run the following from the command line:
#!/usr/bin/perl use strict; use Git::Wrapper; my $git = Git::Wrapper->new('/path/to/repo'); my @log = $git->log; print "Content-type: text/html\n\n<!DOCTYPE html><html><body><ul>\n"; print "<li>id: ${\$log[0]->id}</li>\n"; print "<li>author: ${\$log[0]->author}</li>\n"; print "<li>date: ${\$log[0]->date}</li>\n"; print "<li>message: ${\$log[0]->message}</li>\n"; print "</ul></body></html>";
it works as expected delivering the web page to the terminal - however, when run in the browser it complains:
open3: exec of git version failed at /usr/local/share/perl5/Git/Wrappe +r.pm line 112.
Not a terribly informative error message! I've checked file permissions and am pretty sure these are not the issue. Beyond this I am stumped (the Git::Wrapper documentation does seem a little on the thin side).
Before I start wading through the module code to try and figure out what it is trying to do at the point when it falls over, I wondered if anyone had any experience of using Git::Wrapper with apache and could point me in the direction of what I need to do to get this to work?Many thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using Git::Wrapper with Apache
by Anneq (Vicar) on Jun 12, 2013 at 11:33 UTC | |
by tomgracey (Scribe) on Jun 12, 2013 at 13:48 UTC | |
by Anneq (Vicar) on Jun 12, 2013 at 17:09 UTC | |
by tomgracey (Scribe) on Jul 09, 2013 at 08:42 UTC | |
|
Re: using Git::Wrapper with Apache
by james2vegas (Chaplain) on Jun 12, 2013 at 09:44 UTC |