pthreads 安装error: pthreads requires ZTS,please re-compile PHP with ZTS enabled

来源:互联网 发布:windows android语言 编辑:程序博客网 时间:2024/06/05 02:29
研发的同事要求安装php pthread扩展!
   tar zxvf pthreads-0.0.44.tgz 
   cd pthreads-0.0.44
 
   /usr/local/webserver/php/bin/phpize 
   ./configure  --with-php-config=/usr/local/webserver/php/bin/php-config 
##但在configure时却出错,提示:
configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
原因: 我在编译php的时候没有加入 --enable-maintainer-zts   ,这个必须要重新编译php,不能动态加载的!
于是我重新编译了php,在原来的编译参数基础上那个加入了  --enable-maintainer-zts ,重新编译安装php即可!
   make
   make install
并在php.ini中加入:
extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-zts-20100525"  ##必须和你的目录相对应!
extension =pthreads.so
重启php服务!/etc/init.d/php-fpm restart

0 0