git-webcommit icon indicating copy to clipboard operation
git-webcommit copied to clipboard

ERROR: command failed, it returned exitcode: 127

Open dreadfullyposh opened this issue 11 years ago • 10 comments

I've setup git-webcommit on a project locally on my development computer. When I try to load git-webcommit I get the error above, referencing exitcode: 127.

Can you point me in the right direction to figure out what this means?

dreadfullyposh avatar Nov 20 '13 19:11 dreadfullyposh

Could you give me some information ?

Did you configure the variables at the start of the file ?

You have git installed on the server ? In a path where PHP can run it ?

What version of git are you using on that server ?

Then a bunch of question which can be answered if you make a small .php-script with the code:

What version of PHP do you use ?

Does PHP have open_basedir configured ?

Is safe_mode enabled ?

Is disable_functions configured ?

Lennie avatar Nov 21 '13 00:11 Lennie

I did configure the variables at the start of the file.

I'm running locally (with MAMP) and have git installed. It should be able to be run by PHP. I've tried altering the Apache PATH config too. Is there some other php.ini path config I need to change to make it accessible to PHP? Or is there a place I can configure the path within the script?

PHP version is 5.4.10 open_basedir no safe_mode no disable_functions no

dreadfullyposh avatar Nov 21 '13 15:11 dreadfullyposh

OK, hmm... I don't have Mac for testing. Most of the information you gave me, looks OK at first glance.

I added a configuration option for configuring the path of git, maybe you could try that ?

Lennie avatar Nov 22 '13 01:11 Lennie

Thanks. I updated the file and added the git path in. The exitcode 127 is gone now, but now I get exitcode -1.

I saw there was a $debug variable, so I set that to true and that adds bool(false) to the output.

dreadfullyposh avatar Nov 26 '13 18:11 dreadfullyposh

I assume you configured the $repos at the top ?

Can you run the following git command on the commandline in that directory ?:

git status --porcelain

Lennie avatar Nov 26 '13 19:11 Lennie

Yes the repo is configured.

I've run the command you suggested, and it outputs fine. Screenshot here: http://cl.ly/Sg69

dreadfullyposh avatar Nov 26 '13 19:11 dreadfullyposh

Sorry, seems I didn't notice the Github notification email.

Could you take a look at your Apache-installation and find the configuration for the site which says something like: ErrorLog /var/www/somesite/logs/error.log

And add something like: php_value error_log /var/www/somesite/logs/php_error.log

And reload Apache.

It could log the problem.

It's late here now, I need to get some sleep. I'll have a look tomorrow evening. If I can change some code to get a better error. There might be more I can output.

Lennie avatar Dec 02 '13 01:12 Lennie

I enabled PHP error logs. No errors get reported though when I load the git-webcommit.php script in the browser.

dreadfullyposh avatar Dec 03 '13 02:12 dreadfullyposh

OK, just pushed changes which should display the error.

My best guess is, it's a permissions problem.

The webserver user can't access your user directory.

Lennie avatar Dec 04 '13 07:12 Lennie

confluxgroup do you still have problems with this or did you solve it ?

Lennie avatar Dec 17 '13 08:12 Lennie