There is apache2 web server on my ubuntu. I need to install pthreads, so I cloned a source code of php7 and pthreads from rep(copy to /ext/). I installed all libraries for php, then I 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 good and I executed 'make' and 'make install'. Then I 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 this way I got apache2 with php7, but it does`t start and give logs for me:
PHP Fatal error: The apache2handler SAPI is not supported by pthreads in Unknown on line 0 PHP Fatal error: Unable to start pthreads module in Unknown on line 0 Unknown(0) : Fatal error - The apache2handler SAPI is not supported by pthreads Unknown(0) : Fatal error - Unable to start pthreads module
If I configure php7 without --enable-pthreads, it works. I executed phpinfo() and got result.
How can I solve this problem?