there apache2 web server on ubuntu. need install pthreads, cloned source code of php7 , pthreads rep(copy /ext/). installed libraries php, ran
./buildconf
and
./configure --prefix=/usr --with-config-file-path=/etc --enable-bcmath --enable-calendar --enable-cli --enable-debug --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --enable-maintainer-zts --with-freetype-dir=/usr/local/opt/freetype --with-openssl --with-gd --with-gettext=/usr/local/opt/gettext --with-iconv-dir=/usr --with-icu-dir=/usr --with-mhash --with-jpeg-dir=/usr/local/opt/jpeg --with-kerberos=/usr --with-libedit --with-mhash --with-png-dir=/usr/local/opt/libpng --with-zlib=/usr --with-apxs2=/usr/bin/apxs --libexecdir=/usr/local/php7/7.0.0/libexec --with-bz2=/usr --enable-fpm --with-fpm-user=_www --with-fpm-group=_www --with-curl --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mcrypt --enable-pthreads.
it`s finished , executed 'make' , 'make install'. executed next commands in console:
sudo a2dismod php5 sudo cp /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php7.conf sudo rm -rf /usr/bin/php && sudo ln -s /etc /usr/bin/php sudo service apache2 restart
in way got apache2 php7, does`t start , give logs me:
php fatal error: apache2handler sapi not supported pthreads in unknown on line 0 php fatal error: unable start pthreads module in unknown on line 0 unknown(0) : fatal error - apache2handler sapi not supported pthreads unknown(0) : fatal error - unable start pthreads module
if configure php7 without --enable-pthreads, works. executed phpinfo() , got result.
how can solve problem?
pthreads v3 prohibits loading in cli.
it has never made sense create threads in web server context, in response client. creating threads additional created server, destroys stability , scalability.
creating multi-threaded applications inside of other multi-thread, multi-process applications, without decent way of making either application aware , prepared other, terrible idea; cannot work reliably , disabled.
you must reserve multi-threading command line, safe , sensible.
building pthreads shared (--enable-pthreads=shared), , loading in cli solve problem.
Comments
Post a Comment