已解决
匿名用户 提问于 2015-12-08

如何我要安装php7自定义选项该如何修改?如打开pthreads

5 答案

发布
管理员 2015-12-08

需要重启编译php7 加上参数–enable-maintainer-zts 启用线程安全 ,或者安装php7编辑 include/php-7.sh 加上参数,再下载模块

wget https://github.com/krakjoe/pthreads/archive/v3.1.5.tar.gz
tar xzvf v3.1.5.tar.gz
cd pthreads-3.1.5
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

编译出pthreads.so,在/usr/local/php/etc/php.ini ,加载这个模块,重启php

#1
发布
匿名用户 2015-12-08

[root@bogon]/home/heixiake/soft/oneinstack/src/php-7.0.0/ext/pthreads-3.1.5# ./configure –with-php-config=/usr/local/php/bin/php-config
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for a sed that does not truncate output… /bin/sed
checking for cc… cc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether cc accepts -g… yes
checking for cc option to accept ISO C89… none needed
checking how to run the C preprocessor… cc -E
checking for icc… no
checking for suncc… no
checking whether cc understands -c and -o together… yes
checking for system library directory… lib
checking if compiler supports -R… no
checking if compiler supports -Wl,-rpath,… yes
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for PHP prefix… /usr/local/php
checking for PHP includes… -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory… /usr/local/php/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix… /usr/local/php/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk… gawk
checking whether to enable pthreads… yes, shared
checking wether to enable AddressSanitizer for pthreads… no
checking wether to enable dmalloc for pthreads… no
checking for ZTS… configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
[root@bogon]/home/heixiake/soft/oneinstack/src/php-7.0.0/ext/pthreads-3.1.5#

#2
发布
管理员 2015-12-08

php7 加上参数–enable-maintainer-zts 启用线程安全
相同问题不要重复提交问题哦,谢谢啦

#3
发布
匿名用户 2015-12-08

不好意思,我还以为这个跟贴你收不到,启用就是直接改include/php-7.sh这个文件吧,把以前的php删除,重新安装是吧?

#4
发布
管理员 2015-12-08

恩 重新编译试试

#5

请登录或者 注册 来提交答案