Comments (11)
GitList will always use an absolute path to the git binary. It has nothing to do with the php binary. Or i did not understand your answer correctly?
from gitlist.
Yep. But on some moment on Git Client class, the path initialized on the constructor is wrong, taking a diferent path no absolute or setted on config.ini.
from gitlist.
It will always use the path provided on config.ini. Only when nothing is provided, GitList will use the default /usr/bin/git
.
from gitlist.
For me it's taking /usr/local/php/bin/git instead. Because maybe php doesn't find on included_paths the git binary.
$ php -i | grep PATH safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH PATH => /usr/local/jdk/bin:/home/myuser/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/myuser/bin CLASSPATH => .:/usr/local/jdk/lib/classes.zip _SERVER["PATH"] => /usr/local/jdk/bin:/home/myuser/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/myuser/bin _SERVER["CLASSPATH"] => .:/usr/local/jdk/lib/classes.zip _SERVER["PATH_TRANSLATED"] => _ENV["PATH"] => /usr/local/jdk/bin:/home/myuser/perl5/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/myuser/bin _ENV["CLASSPATH"] => .:/usr/local/jdk/lib/classes.zip
from gitlist.
There is no relationship between the GIT binary and PHP's binaries. It's just a proc_open with absolute path to the binary to be executed. The git binary should not be in the PHP include_path, there's no need to.
from gitlist.
Pretty weird. I jus simply print the path and command:
public function run(Repository $repository, $command) { echo 'Path:' . $this->getPath() . '
'; echo 'Command:'. $command . '
'; $descriptors = array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w")); $process = proc_open($this->getPath() . ' ' . $command, $descriptors, $pipes, $repository->getPat
It seems works fine:
Path:/usr/local/bin/git Command:branch Path:/usr/local/bin/git Command:tag
Then I move the binary:
mv /usr/local/php/bin/git /usr/local/php/bin/git2
That results on:
Oops! sh: /usr/local/php/bin/git: No such file or directory
And it stills shows:
Path:/usr/local/bin/git Command:show master:'other'
from gitlist.
Can you run a file /usr/local/bin/git
and file /usr/local/php/bin/git
?
from gitlist.
$ file /usr/local/bin/git /usr/local/bin/git: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped
$ file /usr/local/php/bin/git /usr/local/php/bin/git: symbolic link to `/usr/local/bin/git'
from gitlist.
You're running PHP FPM?
from gitlist.
The code:
<?php echo php_sapi_name();
Returns:
cgi-fcgi
from gitlist.
Why it is closed? It is already resolved?
from gitlist.
Related Issues (20)
- Better support for repository depth
- Php compatability HOT 1
- Gave up on installing this... HOT 3
- Search for repository in subdirectories HOT 1
- Uncaught Error: Cannot assign string to property Symfony\Component\HttpKernel\Debug\FileLinkFormatter::$fileLinkFormat of type array|false HOT 2
- 404 on all assets HOT 11
- Hello, I use Gitlist 1.1.1 and I want to know if I respect the BSD-2-Clause HOT 2
- git clone over https does not work
- Support needed on installing HOT 3
- git_path from config.yml not used
- Can't create development environment HOT 1
- Can't list repositories HOT 2
- PHP 8.2 => 500 Internal Server Error, setLastErrors must be of type array, bool given HOT 3
- default_repository_dir from config.yml don't work HOT 2
- public/.htaccess is missing HOT 2
- automacao
- Openening a file containing the name of a branch or tag throws a CommandException
- Display Issue and Content Not Found Problem HOT 1
- Problem when adding gits
- pump_local_HMI_X2_V3.0.git HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlist.