2

Specifically, I'm trying to get ViewGit working on a PHP/Apache/Windows installation.

It seems that PHP is unable to run exec('git');.

exec('whoami'); works just fine, so it isn't a problem with exec() being disabled.

Apache is running under it's own user account- if I log in as this user and attempt to run git on the command line I get the expected results. The account also has full permissions to do everything with the /Program Files/Git folder.

If I run exec('git'); on my local machine it works fine, but just won't work on the server.

Any ideas?

2 Answers 2

3

When you type 'git' in command-line on Windows, it opens git.cmd. In typical msysgit installation on Windows, git.cmd is in PATH, but git.exe may not be! So, you can try one of below:

  • Create a git.bat in Windows folder with following contents:
    C:\Program Files (x86)\Git\bin\git.exe (check path)
  • Add git's bin directory also in Windows PATH. (You can do so by editing system environmental variables)
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, but I've got Git/bin and Git/cmd both in my PATH.
Then check if git.cmd is taking precedence. Eitherways, check by adding git.bat
0

I've managed to fix this by upgrading from PHP 5.2 to PHP 5.4. Not sure what the issue was, but that has resolved it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.