Comments (8)
function of extension_loaded("git2") return true.
$repo = Git2\Repository::init("/var/www/test/",true) return error 500.
from php-git.
Sorry,It's a new computer and I forgot to turn on display errors.
The infomation of errors below:
Fatal error: Uncaught exception 'Exception' with message '-1235075708 (error code -1)' in /var/www/test-git.php:2 Stack trace: #0 /var/www/test-git.php(2): Git2\Repository::init('/var/www/testst...', true) #1 {main} thrown in /var/www/test-git.php on line 2
from php-git.
hmm, can you try this with php-cli?
from php-git.
php-cli return this:PHP Fatal error: Class 'Git2\Repository' not found in /var/www/test-git.php on line 3
but the extension didn't return any error when I install it and it could be found in phpinfo();
from php-git.
Fatal error: Uncaught exception 'Exception' with message '-1235075708 (error code -1)' in /var/www/test-git.php:2 Stack trace: #0 /var/www/test-git.php(2): Git2\Repository::init('/var/www/testst...', true) #1 {main} thrown in /var/www/test-git.php on line 2
I guess you don't have a permission to init a repo on that directory. I'll fix this error message later.
php-cli return this:PHP Fatal error: Class 'Git2\Repository' not found in /var/www/test-git.php on line 3 but the extension didn't return any error when I install it and it could be found in phpinfo();
is this still happen? probably namespace issue i think. can you run php --re git2
?
$ php --re git2 |head
Extension [ <persistent> extension #33 git2 version 0.2.1 ] {
- Classes [17] {
Class [ <internal:git2> class Git2\Repository ] {
- Constants [0] {
}
- Static properties [0] {
}
from php-git.
php --re git2 return that extension git2 does not exist.
some other extension like phpredis works well , but when I run php --re redis , it returns the extension does not exist too.
from php-git.
php --re git2 return that extension git2 does not exist.
this means your php-cli doesn't load git2 extension. you should check ini with php --ini
.
from php-git.
hi , @chobie thanks for your reply and extension, it works now.
from php-git.
Related Issues (20)
- this project will update? HOT 2
- error on make: make: *** [reference.lo] Error 1 HOT 8
- PHP extension is not loaded HOT 6
- git_tree_lookup - The requested type does not match the type in the ODB HOT 2
- README instructions for compiling HOT 2
- Version bump to 0.3.0 ?
- Getting php-git up to date HOT 8
- Automated make test failed submission HOT 1
- [run-test.php report]
- How can I stage lines and hunks?
- HELP: Cannot run any of the PHP Git related commands! HOT 2
- Cmake File Error
- Undefined function git_branch_name() HOT 1
- Calling git_treebuilder_create causes seg fault
- git_remote_connect returns false
- working on PHP7 version of php-git HOT 2
- Unable to load dynamic library - http_errno_description is Unknown
- Bindings updated to a recent version libgit2?
- git_clone Segmentation fault
- PHP 8 HOT 6
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 php-git.