inversesoft123 Posted January 11, 2018 Share Posted January 11, 2018 (edited) 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 - -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 January 11, 2018 by inversesoft123 Quote Link to comment Share on other sites More sharing options...
requinix Posted January 11, 2018 Share Posted January 11, 2018 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. 2 Quote Link to comment Share on other sites More sharing options...
Solution inversesoft123 Posted January 12, 2018 Author Solution Share Posted January 12, 2018 (edited) 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 January 12, 2018 by inversesoft123 Quote Link to comment Share on other sites More sharing options...
gizmola Posted January 12, 2018 Share Posted January 12, 2018 Looks like your issue was solved thanks to Requinix's debugging, so I've taken the liberty of marking your reply as Best Answer. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.