您的位置:首页 > 产品设计 > UI/UE

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

2014-03-28 09:55 791 查看
研发的同事要求安装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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐