Jump to content
Sign in to follow this  
inversesoft123

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.

Edited by inversesoft123

Share this post


Link to post
Share on other sites

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

pthreads v3 requires PHP7 or above. PHP5 needs to use pthreads v2 which can be found in the PHP5 branch.

  • Like 2

Share this post


Link to post
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.

Edited by inversesoft123

Share this post


Link to post
Share on other sites

Looks like your issue was solved thanks to Requinix's debugging, so I've taken the liberty of marking your reply as Best Answer.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

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.