有没有一种方法可以在不重新编译的情况下启用PHP的线程安全性,或者使用YUM来完成这个任务?我正在尝试安装pthreads,它要求PHP必须使用
--enable-maintainer-zts
进行编译。但是,我不想重新编译,因为我想使用yum来管理我的PHP堆栈。我目前正在使用REMI repo。我注意到有一个名为php-zts的包,但是我的PHP版本是4.4,并且我找不到php-zts的源RPM。是否有一种方法可以使用yum并启用PHP的线程安全性,以便我可以通过使用来安装?
#pecl install channel://pecl.php.net/pthreads-0.0.42
downloading pthreads-0.0.42.tgz ...
Starting to download pthreads-0.0.42.tgz (53,755 bytes)
.............done: 53,755 bytes
33 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
building in /var/tmp/pear-build-rootkThpG6/pthreads-0.0.42
running: /var/tmp/pthreads/configure
...
checking whether to enable Threading API... yes, shared
checking checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
ERROR: `/var/tmp/pthreads/configure' failed
正如您所看到的,上面的代码失败了,因为PHP没有启用ZTS。