Jump to content

PHP 5.6 ZTS v/s PHP 7 ZTS MongoDB Driver Problem


Recommended Posts

Hello All,

 

 I had a major problem with choice of PHP and MongoDB versions. 

I have a project developed in PHP5.6 with PHP 5 MongoDB Driver and I am willing to use PHP with ZTS and pThreads for parallel execution. Unfortunately when I compile PHP with ZTS and pthreads compiler gives me error while setting up PHP

 

 

/usr/src/php-5.6.12/meta_ccld -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/pthreads/ -I/usr/src/php-5.6.12/ext/pthreads/ -DPHP_ATOM_INC -I/usr/src/php-5.6.12/include -I/usr/src/php-5.6.12/main -I/usr/src/php-5.6.12 -I/usr/src/php-5.6.12/ext/date/lib -I/usr/src/php-5.6.12/ext/ereg/regex -I/usr/include/libxml2 -I/usr/src/php-5.6.12/ext/mbstring/oniguruma -I/usr/src/php-5.6.12/ext/mbstring/libmbfl -I/usr/src/php-5.6.12/ext/mbstring/libmbfl/mbfl -I/usr/src/php-5.6.12/ext/sqlite3/libsqlite -I/usr/src/php-5.6.12/ext/pthreads -I/usr/src/php-5.6.12/ext/zip/lib -I/usr/src/php-5.6.12/TSRM -I/usr/src/php-5.6.12/Zend -D_REENTRANT -I/usr/include -g -fvisibility=hidden -pthread - O0 -Wall -DZTS -c /usr/src/php-5.6.12/ext/pthreads/php_pthreads.c  -fPIC -DPIC -o ext/pthreads/.libs/php_pthreads.o

In file included from /usr/src/php-5.6.12/ext/pthreads/php_pthreads.c:22:0:

ext/pthreads/src/pthreads.h:72:35: fatal error: Zend/zend_inheritance.h: No such file or directory

 #include <Zend/zend_inheritance.h>

                                   ^

compilation terminated.

make: *** [ext/pthreads/php_pthreads.lo] Error 1

 

Now, one may thing why I am sticking to PHP5, Its clearly becuase of MongoDB driver of php5. PHP7 with ZTS works perfectly but again I canot connect MongoDB because php7 have different mongoDB driver.

 

Please guide me whether updating code to PHP7 Mongo is just a solution left with me ? or is there any workaround ?

 

Thanks in Advance.

Link to comment
Share on other sites

Are you trying to compile pthreads v3 for PHP 5.6? Won't work. Check the readme:

 

Thank you for your help, I tried to install  other pthreads versions on Ubnutu server but it did not worked. Then I installed with centOS 6.5 with PHP 5.5.8 and used PECL to install pthreads-2.0.1 and it worked.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.