After I compiled apache 2.4 and php 7.0.20 ( this is my configure line :

./configure' '--with-libdir=lib64' '--prefix=/usr/local' '--with-layout=PHP' '--with-pear' '--with-apxs2' '--enable-calendar' '--enable-bcmath' '--with-gmp' '--enable-exif' '--with-mcrypt' '--with-mhash' '--with-zlib' '--with-bz2' '--enable-zip' '--enable-ftp' '--enable-mbstring' '--with-iconv' '--enable-intl' '--with-icu-dir=/usr' '--with-gettext' '--with-pspell' '--enable-sockets' '--with-openssl' '--with-curl' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-freetype-dir=/usr' '--with-libxml-dir=/usr' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-soap' '--with-xmlrpc' '--with-xsl' '--with-tidy=/usr' '--with-readline' '--enable-pcntl' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-shmop' '--enable-maintainer-zts' '--with-tsrm-pthreads')

installed pthreads with pecl , added the extension to my php.ini file , restarted apache and then apache crashed and not starting anymore. apache error log messege :

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

My question is what are the steps to install pthreads on the best practice way. I have tried everything but no luck ..


  • 1
    Best practice is to not compile from source but use your distros package manager and a repository offering the software you need. – Sven Jun 29 '17 at 10:55
  • can't you just proxy to php-fpm and rid httpd of mod_php once and for all? – ezra-s Jun 29 '17 at 12:03
  • There is a way to make it work on mod_php? I compiled all from here : geekpeek.net/running-latest-apache-2-4-with-php-7-0-on-centos-6 – Arian Svirsky Jul 2 '17 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.