Jump to content

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


Go to solution Solved by inversesoft123,

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
Link to comment
Share on other sites

  • Solution

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.