It has been weeks now that I cannot install pthreads. I am going to list the error logs then I will list my configuration options.
These are the errors I get:
(Apache Error Log)
The apache2handler SAPI is not supported by pthreads in Unknown on line 0
apachectl -V output
Server version: Apache/2.4.18 (Unix)
Server built: Jan 10 2016 14:54:48
Server's Module Magic Number: 20120211:52
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Meanwhile PHP error logs:
(PHP Error Log)
bin/php -m
PHP Warning: Module 'pthreads' already loaded in Unknown on line 0
[PHP Modules]
Core
date
pcre
pthreads
Reflection
SPL
standard
There is no another ini
files that loads extension=pthreads.so
, All these errors only occur when I include extension=pthreads.so
into php-cli.ini
file.
Without php-cli.ini
file, php -m
lists these modules: bin/php -m
[PHP Modules]
Core
date
pcre
Reflection
SPL
standard
At this point PHP AND APACHE work perfectly except pthreads class is not recognized.
Apache Configuration Options
./configure \
--prefix=path/apache \
--exec-prefix=path/apache \
--with-pcre=path/apache/pcre \
--enable-module=so \
--with-mpm=worker
PHP Configuration Options
./configure \
--prefix=path \
--exec-prefix=path \
--with-apxs2=path/apache/bin/apxs \
--with-config-file-scan-dir=path/php/lib \
--with-config-file-path=path/php/lib \
--disable-all \
--enable-maintainer-zts \
--enable-pthreads=shared