OpenCV-for-PHP icon indicating copy to clipboard operation
OpenCV-for-PHP copied to clipboard

OpenCV 3.2 , PHP7.0 support

Open minarc opened this issue 8 years ago • 10 comments

image

I am on php7.0 and OpenCV 3.2.

/bin/bash /home/rumo/OpenCV-for-PHP/libtool --mode=compile g++ -I. -I/home/rumo/OpenCV-for-PHP -DPHP_ATOM_INC -I/home/rumo/OpenCV-for-PHP/include -I/home/rumo/OpenCV-for-PHP/main -I/home/rumo/OpenCV-for-PHP -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/opencv -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/rumo/OpenCV-for-PHP/opencv.cpp -o opencv.lo libtool: compile: g++ -I. -I/home/rumo/OpenCV-for-PHP -DPHP_ATOM_INC -I/home/rumo/OpenCV-for-PHP/include -I/home/rumo/OpenCV-for-PHP/main -I/home/rumo/OpenCV-for-PHP -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/opencv -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/rumo/OpenCV-for-PHP/opencv.cpp -fPIC -DPIC -o .libs/opencv.o /home/rumo/OpenCV-for-PHP/libtool: line 1762: warning: setlocale: LC_CTYPE: cannot change locale (ko_KR.UTF-8) /bin/bash /home/rumo/OpenCV-for-PHP/libtool --mode=compile g++ -I. -I/home/rumo/OpenCV-for-PHP -DPHP_ATOM_INC -I/home/rumo/OpenCV-for-PHP/include -I/home/rumo/OpenCV-for-PHP/main -I/home/rumo/OpenCV-for-PHP -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/opencv -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/rumo/OpenCV-for-PHP/opencv_error.cpp -o opencv_error.lo libtool: compile: g++ -I. -I/home/rumo/OpenCV-for-PHP -DPHP_ATOM_INC -I/home/rumo/OpenCV-for-PHP/include -I/home/rumo/OpenCV-for-PHP/main -I/home/rumo/OpenCV-for-PHP -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/opencv -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/rumo/OpenCV-for-PHP/opencv_error.cpp -fPIC -DPIC -o .libs/opencv_error.o /home/rumo/OpenCV-for-PHP/libtool: line 1762: warning: setlocale: LC_CTYPE: cannot change locale (ko_KR.UTF-8) /home/rumo/OpenCV-for-PHP/opencv_error.cpp: In function 'int zm_startup_opencv_error(int, int)': /home/rumo/OpenCV-for-PHP/opencv_error.cpp:35:122: error: too many arguments to function 'zend_class_entry* zend_register_internal_class_ex(zend_class_entry*, zend_class_entry*)' opencv_ce_cvexception = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), "Exception" TSRMLS_CC); ^ In file included from /usr/include/php/20151012/main/php.h:40:0, from /home/rumo/OpenCV-for-PHP/php_opencv.h:25, from /home/rumo/OpenCV-for-PHP/opencv_error.cpp:25: /usr/include/php/20151012/Zend/zend_API.h:290:28: note: declared here ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce); ^ Makefile:196: recipe for target 'opencv_error.lo' failed make: *** [opencv_error.lo] Error 1

minarc avatar Dec 22 '16 03:12 minarc

+1

ghost avatar Dec 29 '16 07:12 ghost

+1

velpaxl avatar May 19 '17 10:05 velpaxl

+1

nxtpl avatar Jun 09 '17 10:06 nxtpl

Any plan to upgrade the wrapper?

marchrius avatar Jun 12 '17 08:06 marchrius

Olá...

Fiz umas modificações e cheguei até aqui ( veja o codigo https://github.com/wellton/OpenCV-for-PHP para quem quiser ajudar. ).. alguem sabe o que motiva esse erro?

captura de tela em 2017-06-26 20-37-06

ghost avatar Jun 26 '17 23:06 ghost

Hey guys, you may try it: https://github.com/hihozhou/php-opencv

yanhuixie avatar Jul 06 '17 09:07 yanhuixie

Thanks a lot @yanhuixie !

minarc avatar Jul 06 '17 09:07 minarc

Hi @yanhuixie congratulations for your code. =)

But, what is? "checking for opencv... too old "

I have the libcv-dev ahd libopencv-dev installed in my computer =(

Source: opencv Version: 2.4.9.1+dfsg1-2

ghost avatar Jul 06 '17 14:07 ghost

Hi @wellton ! Sorry I'm not the author of hihozhou/php-opencv, and glad to see your issue in it's repo. As far as I know, it requires PHP7.0+ and OpenCV 3.2. So, If your opencv version is 2.4.9.1, that's really a little old... :-)

yanhuixie avatar Jul 06 '17 15:07 yanhuixie

show.. thanks @yanhuixie =)

ghost avatar May 15 '18 19:05 ghost