Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP extension is not loaded #60

Closed
djfly opened this issue Feb 18, 2014 · 6 comments
Closed

PHP extension is not loaded #60

djfly opened this issue Feb 18, 2014 · 6 comments

Comments

@djfly
Copy link

djfly commented Feb 18, 2014

[root@localhost ~]# php -i | grep extension_dir
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/git2.so' - /usr/lib/php/modules/git2.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
extension_dir => /usr/lib/php/modules => /usr/lib/php/modules
[root@localhost ~]#

@chobie
Copy link
Member

chobie commented Feb 18, 2014

PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0

maybe you should re-setup your php env first. your php env seems wrong.
this is not php-git related issue.

@chobie chobie closed this as completed Feb 18, 2014
@djfly
Copy link
Author

djfly commented Feb 18, 2014

[root@localhost php-git]# make
/bin/sh /root/php-git/libtool --mode=compile cc -I. -I/root/php-git -DPHP_ATOM_INC -I/root/php-git/include -I/root/php-git/main -I/root/php-git -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/root/php-git/libgit2/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -c /root/php-git/repository.c -o repository.lo
cc -I. -I/root/php-git -DPHP_ATOM_INC -I/root/php-git/include -I/root/php-git/main -I/root/php-git -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/root/php-git/libgit2/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -c /root/php-git/repository.c -fPIC -DPIC -o .libs/repository.o
In file included from /root/php-git/php_git2.h:35,
from /root/php-git/repository.c:25:
/usr/include/php/main/php.h:261: warning: redundant redeclaration of 'environ'
/usr/include/unistd.h:498: warning: previous declaration of 'environ' was here
In file included from /usr/include/php/main/php.h:384,
from /root/php-git/php_git2.h:35,
from /root/php-git/repository.c:25:
/usr/include/php/main/php_output.h:49: warning: redundant redeclaration of 'php_ob_get_buffer'
/usr/include/php/main/php_output.h:40: warning: previous declaration of 'php_ob_get_buffer' was here
/usr/include/php/main/php_output.h:50: warning: redundant redeclaration of 'php_ob_get_length'
/usr/include/php/main/php_output.h:41: warning: previous declaration of 'php_ob_get_length' was here
In file included from /root/php-git/repository.c:25:
/root/php-git/php_git2.h: In function 'php_git2_date_instantiate':
/root/php-git/php_git2.h:218: warning: implicit declaration of function 'Z_SET_REFCOUNT_P'
/root/php-git/php_git2.h:219: warning: implicit declaration of function 'Z_UNSET_ISREF_P'
/root/php-git/php_git2.h: In function 'php_git2_create_signature_from_commit':
/root/php-git/php_git2.h:247: warning: implicit declaration of function 'php_date_get_date_ce'
/root/php-git/php_git2.h:247: warning: passing argument 1 of 'php_git2_date_instantiate' makes pointer from integer without a cast
/root/php-git/php_git2.h:256: warning: passing argument 2 of 'zend_call_method' makes pointer from integer without a cast
/root/php-git/php_git2.h: In function 'create_tree_entry_from_entry':
/root/php-git/php_git2.h:271: warning: ISO C90 forbids mixed declarations and code
/root/php-git/repository.c: In function 'php_git2_repository_initialize':
/root/php-git/repository.c:107: warning: passing argument 4 of 'add_property_string_ex' discards qualifiers from pointer target type
/root/php-git/repository.c: In function 'zim_git2_repository_getPath':
/root/php-git/repository.c:194: warning: initialization discards qualifiers from pointer target type
/root/php-git/repository.c: In function 'zim_git2_repository_getWorkdir':
/root/php-git/repository.c:217: warning: initialization discards qualifiers from pointer target type
/root/php-git/repository.c: In function 'zim_git2_repository_headOrphan':
/root/php-git/repository.c:290: warning: implicit declaration of function 'git_repository_head_orphan'
/root/php-git/repository.c: In function 'zim_git2_repository_write':
/root/php-git/repository.c:464: warning: passing argument 1 of 'stream->finalize_write' from incompatible pointer type
/root/php-git/repository.c:464: warning: passing argument 2 of 'stream->finalize_write' from incompatible pointer type
/root/php-git/repository.c: At top level:
/root/php-git/repository.c:534: error: expected ';', ',' or ')' before '' token
/root/php-git/repository.c: In function 'zim_git2_repository_diff':
/root/php-git/repository.c:554: error: 'git_diff_list' undeclared (first use in this function)
/root/php-git/repository.c:554: error: (Each undeclared identifier is reported only once
/root/php-git/repository.c:554: error: for each function it appears in.)
/root/php-git/repository.c:554: error: 'list' undeclared (first use in this function)
/root/php-git/repository.c:555: warning: ISO C90 forbids mixed declarations and code
/root/php-git/repository.c:566: warning: passing argument 1 of 'git_diff_tree_to_tree' from incompatible pointer type
/root/php-git/repository.c:568: warning: implicit declaration of function 'git_diff_print_compact'
/root/php-git/repository.c:568: error: 'printer' undeclared (first use in this function)
/root/php-git/repository.c:570: warning: implicit declaration of function 'git_diff_list_free'
/root/php-git/repository.c: In function 'php_git2_repository_init':
/root/php-git/repository.c:607: warning: implicit declaration of function 'INIT_NS_CLASS_ENTRY'
/root/php-git/repository.c:598:1: warning: macro "lookup" is not used
make: *
* [repository.lo] Error 1

this right?

@djfly
Copy link
Author

djfly commented Feb 18, 2014

[root@localhost php-git]# php -i | grep extension_dir
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/git2.so' - /usr/lib/php/modules/git2.so: cannot open shared object file: No such file or directory in Unknown on line 0
extension_dir => /usr/lib/php/modules => /usr/lib/php/modules

centos5.6
PHP Version 5.2.17
mcrypt Version 2.5.8

@chobie
Copy link
Member

chobie commented Feb 18, 2014

Could you try above php5.3 above and build with latest development branch?

@djfly
Copy link
Author

djfly commented Feb 18, 2014

Environment must php5.3 above ?

@chobie
Copy link
Member

chobie commented Feb 18, 2014

yes. php-git doesn't support 5.2. please use 5.3 above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants